Andy 3 anos atrás
pai
commit
d2ac1707e1

+ 0 - 1
src/views/BidSystem/ContractList/edit.vue

@@ -612,7 +612,6 @@
               <Option :value="0" label="无" />
             </Select>
           </FormItem>
-
           <FormItem label="产品分类">
             <el-cascader
               clearable

+ 103 - 77
src/views/BidSystem/ProductDeOrder/deorderdetail.vue

@@ -611,16 +611,34 @@
     </div>
     <li v-for="item in formData.parts" v-show="false" :key="item.id"></li>
     <!-- 相似产品弹窗 -->
-    <Modal
+    <el-dialog
       title="选择相似产品"
-      v-model="showSimilarProductModal"
-      :mask-closable="false"
+      :visible="showSimilarProductModal"
+      :close-on-click-modal="false"
+      :close-on-press-escape="false"
       class="similarProductModal"
-      :width="1000"
+      width="1000px"
     >
       <Form :label-width="100" :model="similarProductData">
         <FormItem label="产品分类">
-          <Select
+          <el-cascader
+            clearable
+            v-model="similarProductData.type_name"
+            size="small"
+            style="width: 120px"
+            :show-all-levels="false"
+            :options="PDTTypeList"
+            :props="{
+              expandTrigger: 'hover',
+              children: 'child',
+              value: 'title',
+              label: 'title',
+              checkStrictly: true,
+              emitPath: false,
+            }"
+            @change="(e) => hanndleAddPDTTypeChange(similarProductData, e)"
+          ></el-cascader>
+          <!-- <Select
             v-model="similarProductData.type_name"
             placeholder="请选择"
             style="width: 120px"
@@ -632,12 +650,13 @@
               :key="item.title"
               :label="item.title"
             ></Option>
-          </Select>
+          </Select> -->
         </FormItem>
         <FormItem label="产品名称:">
           <Input
             type="text"
             size="small"
+            clearable
             v-model="similarProductData.title"
             style="width: 120px"
           />
@@ -646,6 +665,7 @@
           <Input
             type="text"
             size="small"
+            clearable
             v-model="similarProductData.model"
             placeholder="请输入"
             style="width: 120px"
@@ -655,6 +675,7 @@
           <Input
             type="text"
             size="small"
+            clearable
             v-model="similarProductData.url_number"
             style="width: 120px"
           />
@@ -687,14 +708,18 @@
         />
       </div>
       <div class="modal-footer" slot="footer">
-        <Button @click="showSimilarProductModal = false">取消</Button>
+        <Button
+          style="margin-right:10px"
+          @click="showSimilarProductModal = false"
+          >取消</Button
+        >
         <Button
           type="primary"
           @click="handleSimilarProductConfirm(tempSimilarProductData.id)"
           >确认</Button
         >
       </div>
-    </Modal>
+    </el-dialog>
     <!-- 选择工艺路线弹窗 -->
     <Modal
       class-name="vertical-center-modal"
@@ -1389,71 +1414,69 @@ export default {
           order_no,
           orders_area_product_detail_id,
         },
-      })
-        .then((res) => {
-          this.formData = res.data;
-          // this.formData.basic_product_id = 8;
-          // 获取产品分类、测量字段
-          this.handleMatchBP(this.productTypes, this.formData.basic_product_id);
-          this.handleClick(JSON.stringify(this.nowSelectObj));
-          if (this.formData.parts.length == 0) {
-            this.formData.parts = [
-              {
-                isAddPart: true, //是否为新增部件
-                isAddProcessRoute: true, //是否为新增工艺组合
-                long: "",
-                width: "",
-                thick: "",
-                parts_type: "", //部件分类名称
-                pay_state: "", //标签
-                part_id: "", //部件名称
-                company: "", //单位
-                processCombination: "", //工艺组合名称
-                process_price: "", //工艺价格
-                proportion: "", //产值比例
-                properties: [], //工艺属性
-                ProcessAttrList: JSON.parse(
-                  JSON.stringify(this.tempProcessAttrList)
-                ), //工艺属性列表
-                partsProcessLineTableData: [], //工艺路线表格
-                partsWoodTableData: [
-                  {
-                    title: "",
-                    spare_parts: "",
-                    number: "",
-                    company: "",
-                    long: "",
-                    wide: "",
-                    thick: "",
-                    technological_requirement_id: "",
-                    sub_num: "",
-                    veneer_id: "",
-                    paint_id: "",
-                    label: "",
-                    print_num: "",
-                  },
-                ], //木板表格
-                partsMetalseData: [
-                  {
-                    spare_parts: "",
-                    number: "",
-                    company: "",
-                    price: "",
-                    total_price: "",
-                  },
-                ], //五金表格
-                partsNameList: [{ id: "", title: "" }], //部件名称列表
-                partsProcessRouteList: [{ id: "", title: "" }], //工艺组合名称列表
-                checkBox: [],
-              },
-            ];
-          } else {
-            this.handleSimilarProductConfirm(
-              res.data.product_id,
-              this.formData
-            );
-          }
-        })
+      }).then((res) => {
+        this.formData = res.data;
+        // this.formData.basic_product_id = 8;
+        // 获取产品分类、测量字段
+        this.handleMatchBP(this.productTypes, this.formData.basic_product_id);
+        this.handleClick(JSON.stringify(this.nowSelectObj));
+        if (this.formData.parts.length == 0) {
+          this.formData.parts = [
+            {
+              isAddPart: true, //是否为新增部件
+              isAddProcessRoute: true, //是否为新增工艺组合
+              long: "",
+              width: "",
+              thick: "",
+              parts_type: "", //部件分类名称
+              pay_state: "", //标签
+              part_id: "", //部件名称
+              company: "", //单位
+              processCombination: "", //工艺组合名称
+              process_price: "", //工艺价格
+              proportion: "", //产值比例
+              properties: [], //工艺属性
+              ProcessAttrList: JSON.parse(
+                JSON.stringify(this.tempProcessAttrList)
+              ), //工艺属性列表
+              partsProcessLineTableData: [], //工艺路线表格
+              partsWoodTableData: [
+                {
+                  title: "",
+                  spare_parts: "",
+                  number: "",
+                  company: "",
+                  long: "",
+                  wide: "",
+                  thick: "",
+                  technological_requirement_id: "",
+                  sub_num: "",
+                  veneer_id: "",
+                  paint_id: "",
+                  label: "",
+                  print_num: "",
+                },
+              ], //木板表格
+              partsMetalseData: [
+                {
+                  spare_parts: "",
+                  number: "",
+                  company: "",
+                  price: "",
+                  total_price: "",
+                },
+              ], //五金表格
+              partsNameList: [{ id: "", title: "" }], //部件名称列表
+              partsProcessRouteList: [{ id: "", title: "" }], //工艺组合名称列表
+              checkBox: [],
+            },
+          ];
+        } else {
+          this.formData.parts.map(v=>{
+            this.handleSimilarProductConfirm(res.data.product_id, v);
+          })
+        }
+      });
     },
     handleMatchBP(array, id) {
       array.forEach((element, index) => {
@@ -1713,8 +1736,6 @@ export default {
               });
           });
       });
-      // 新增工艺组合,清空已选工艺路线
-      item.partsProcessLineTableData = [];
       if (!item.partsProcessRouteList) {
         item.partsProcessRouteList = [];
       }
@@ -1839,7 +1860,6 @@ export default {
           });
         } else {
           item.isAddProcessRoute = true;
-          item.process_name = "";
         }
       }
     },
@@ -2223,7 +2243,7 @@ export default {
                 });
                 element.route_id = res.data.id;
                 element.part_id = result.data.id;
-              }else{
+              } else {
                 element.route_id = element.processCombination;
               }
             } else {
@@ -2267,6 +2287,8 @@ export default {
               } else {
                 save_sucess = false;
               }
+            } else {
+              element.route_id = element.processCombination;
             }
           }
         }
@@ -2659,4 +2681,8 @@ export default {
     top: 0;
   }
 }
+/deep/.el-input--small .el-input__inner {
+  height: 24px;
+  line-height: 24px;
+}
 </style>

+ 17 - 6
src/views/BidSystem/ProductDeOrder/detail.vue

@@ -45,17 +45,28 @@
             placeholder="请输入图号"
           />
         </FormItem>
-        <FormItem label="拆单状态:">
+        <FormItem label="是否完成:">
           <Select
-            v-model="searchData.state"
+            v-model="searchData.status"
             size="small"
             clearable
             filterable
             style="width: 150px"
           >
-            <Option label="未完成" :value="0"> </Option>
-            <Option label="拆单中" :value="1"> </Option>
-            <Option label="已完成" :value="2"> </Option>
+            <Option label="是" :value="1"></Option>
+            <Option label="否" :value="0"></Option>
+          </Select>
+        </FormItem>
+        <FormItem label="是否下生产:">
+          <Select
+            v-model="searchData.sub_state"
+            size="small"
+            clearable
+            filterable
+            style="width: 150px"
+          >
+            <Option label="是" :value="2"></Option>
+            <Option label="否" :value="1"></Option>
           </Select>
         </FormItem>
         <FormItem>
@@ -144,7 +155,7 @@
               ></Option>
             </Select>
           </template>
-          <template slot="supSet" slot-scope="{ row , index}">
+          <template slot="supSet" slot-scope="{ row, index }">
             <!-- <a
               style="margin: 0 5px; color: red"
               v-show="$route.query.type != 3"