Selaa lähdekoodia

Merge branch 'master' of 121.41.102.225:Nidong/jiufang into hw

mushencc 4 vuotta sitten
vanhempi
commit
d59465ff81

+ 21 - 20
src/views/BidSystem/ContractList/edit.vue

@@ -287,7 +287,7 @@
             :disabled="isChecked"
             size="small"
             v-model="formData.remark"
-            placeholder=""
+            placeholder="请输入"
             style="width: 200px"
           />
         </FormItem>
@@ -523,12 +523,15 @@
       </div>
     </Modal>
     <!-- 新增产品弹窗 -->
-    <Modal
+    <!-- v-model="showPDTModal" -->
+    <!-- :mask-closable="false" -->
+    <el-dialog
       title="新增产品"
-      v-model="showPDTModal"
-      :mask-closable="false"
+      :visible="showPDTModal"
+      :close-on-click-modal="false"
+      :close-on-press-escape="false"
       class="addPDTFormModal"
-      :width="1000"
+      width="1000px"
     >
       <div
         class="addPDTForm"
@@ -609,7 +612,6 @@
               <Option :value="0" label="无" />
             </Select>
           </FormItem>
-
           <FormItem label="产品分类">
             <el-cascader
               clearable
@@ -704,7 +706,7 @@
             >
           </FormItem>
         </Form>
-        <div class="addPDTProcess">
+        <div class="addPDTProcess" style="z-index:9999">
           <div
             v-for="(_item, _index) in tempItem.addPDTProcessAttrList"
             :key="_item.id"
@@ -713,7 +715,6 @@
             <Select
               v-model="_item.id"
               size="small"
-              transfer
               @on-change="
                 (value) => handleAddPDTAttrChange(_item, _index, value)
               "
@@ -731,7 +732,6 @@
               v-model="_item.process_detail"
               filterable
               clearable
-              transfer
               label-in-value
               @on-change="
                 (value) => handleAddPDTAttrDetailChange(_item, _index, value)
@@ -780,17 +780,20 @@
         </div>
       </div>
       <div class="modal-footer" slot="footer">
-        <Button @click="showPDTModal = false">取消</Button>
+        <Button style="margin-right:10px" @click="showPDTModal = false"
+          >取消</Button
+        >
         <Button type="primary" @click="handleAddPDTConfirm">确认</Button>
       </div>
-    </Modal>
+    </el-dialog>
     <!-- 编辑产品弹窗 -->
-    <Modal
+    <el-dialog
       title="编辑产品"
-      v-model="showPDTEditModal"
-      :mask-closable="false"
+      :visible="showPDTEditModal"
+      :close-on-click-modal="false"
+      :close-on-press-escape="false"
       class="addPDTFormModal"
-      :width="1000"
+      width="1000px"
     >
       <div class="addPDTForm">
         <Form :label-width="100" :model="PDTEdit">
@@ -986,7 +989,6 @@
             <Select
               v-model="_item.id"
               size="small"
-              transfer
               @on-change="
                 (value) => handleAddPDTAttrChange(_item, _index, value)
               "
@@ -1005,7 +1007,6 @@
               filterable
               clearable
               label-in-value
-              transfer
               @on-change="
                 (value) => handleAddPDTAttrDetailChange(_item, _index, value)
               "
@@ -1035,7 +1036,7 @@
         <Button @click="showPDTEditModal = false">取消</Button>
         <Button type="primary" @click="handlePDTEditConfirm">确认</Button>
       </div>
-    </Modal>
+    </el-dialog>
     <!-- 特殊字段弹窗 -->
     <Modal
       title="特殊字段"
@@ -2640,8 +2641,8 @@ export default {
           params: { id: e },
         }).then((res) => {
           if (res.code == 200) {
-            if (res.data.measure_id.length>0) {
-              item.tempPDTTypeList = res.data.measure_id
+            if (res.data.measure_id.length > 0) {
+              item.tempPDTTypeList = res.data.measure_id;
               item.tempMeasureList = JSON.parse(
                 JSON.stringify(this.measureList)
               );

+ 7 - 7
src/views/BidSystem/DeepeningOrder/detail.vue

@@ -499,12 +499,13 @@
       </div>
     </Modal>
     <!-- 新增产品弹窗 -->
-    <Modal
+    <el-dialog
       title="新增产品"
-      v-model="showPDTModal"
-      :mask-closable="false"
+      :visible="showPDTModal"
+      :close-on-click-modal="false"
+      :close-on-press-escape="false"
       class="addPDTFormModal"
-      :width="1000"
+      width="1000px"
     >
       <div
         class="addPDTForm"
@@ -676,7 +677,6 @@
             <Select
               :value="_item.id"
               size="small"
-              transfer
               @on-change="
                 (value) => handleAddPDTAttrChange(_item, _index, value)
               "
@@ -744,10 +744,10 @@
         </div>
       </div>
       <div class="modal-footer" slot="footer">
-        <Button @click="showPDTModal = false">取消</Button>
+        <Button style="margin-right:10px" @click="showPDTModal = false">取消</Button>
         <Button type="primary" @click="handleAddPDTConfirm">确认</Button>
       </div>
-    </Modal>
+    </el-dialog>
   </div>
 </template>
 

+ 105 - 139
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,133 +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
-            );
-            // this.formData.parts.map((element) => {
-            //   console.log('element :>> ', element);
-            //   element.partsProcessLineTableData = [];
-            //   element.wide = element.formula_w;
-            //   element.proportion = element.ratio;
-            //   element.thick = element.formula_h;
-            //   element.long = element.formula_l;
-            //   (element.ProcessAttrList = this.tempProcessAttrList), //工艺属性列表
-            //     this.axios("/api/parts_detail", {
-            //       params: { id: element.part_id },
-            //     })
-            //       .then((re) => {
-            //         // element.company = re.data.company
-            //         element.isAddPart = true;
-            //         element.isAddProcessRoute = true;
-            //         element.parts_type = re.data.p_id;
-            //         // element.part_id = re.data.title
-            //         this.axios({
-            //           method: "get",
-            //           url: "/api/parts_index",
-            //           params: {
-            //             bp_id: element.parts_type,
-            //           },
-            //         })
-            //           .then((r) => {
-            //             element.partsNameList = r.data.data;
-            //             if (isEditItem) {
-            //               let item = isEditItem;
-            //               // let item = JSON.parse(JSON.stringify(isEditItem));
-            //               item.parts.forEach((element) => {
-            //                 element.processCombination = element.route_id;
-            //                 let obj = { value: element.route_id, label: "" };
-            //                 this.handleProcessRouteSelect(element, obj);
-            //               });
-            //               isEditItem = item;
-            //             }
-            //             this.$forceUpdate()
-            //           })
-            //           .catch((err) => { });
-            //         element.company = re.data.company;
-            //         // element.partsNameList = [{ id: re.data.id, title: re.data.title }]
-            //         element.pay_state = re.data.label;
-            //         // element.partsWoodTableData = re.data.detail;
-            //         this.showSimilarProductModal = false;
-            //       })
-            //       .catch((err) => { });
-            //   let obj = { value: element.part_id };
-            //   this.handlePartsNameSelect(element, obj);
-            // });
-
-            this.formData.parts.map((element) => {
-              // element.properties = element.process_ids;
-              // 1 木板  2 木皮  3 实木  4 辅料  5 五金  6 油漆
-              //   if (element.type_id == 0 || element.type_id == 1) {
-              //     this.tableData.push(element)
-              //   } else if (element.type_id == 5) {
-              //     this.metalsTableData.push(element)
-              //   }
-              // process_ids: "1,3"
-              // route_id: 10
-            });
-          }
-        })
-        .catch((err) => {});
+      }).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) => {
@@ -1680,8 +1641,8 @@ export default {
             // }
             this.formData.parts.map((element) => {
               element.partsProcessLineTableData = [];
-              element.wide = element.formula_w;
               element.proportion = element.ratio;
+              element.wide = element.formula_w;
               element.thick = element.formula_h;
               element.long = element.formula_l;
               element.ProcessAttrList = JSON.parse(
@@ -1775,8 +1736,6 @@ export default {
               });
           });
       });
-      // 新增工艺组合,清空已选工艺路线
-      item.partsProcessLineTableData = [];
       if (!item.partsProcessRouteList) {
         item.partsProcessRouteList = [];
       }
@@ -1901,7 +1860,6 @@ export default {
           });
         } else {
           item.isAddProcessRoute = true;
-          item.process_name = "";
         }
       }
     },
@@ -2285,6 +2243,8 @@ export default {
                 });
                 element.route_id = res.data.id;
                 element.part_id = result.data.id;
+              } else {
+                element.route_id = element.processCombination;
               }
             } else {
               save_sucess = false;
@@ -2327,6 +2287,8 @@ export default {
               } else {
                 save_sucess = false;
               }
+            } else {
+              element.route_id = element.processCombination;
             }
           }
         }
@@ -2719,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"

+ 1 - 1
src/views/MeasurementOrderMannage/edit.vue

@@ -200,7 +200,7 @@ export default {
         {
           title: "产品名称",
           align: "center",
-          key: "product",
+          key: "product_title",
           minWidth: 200,
         },
         { title: "产品型号", align: "center", key: "model", minWidth: 150 },