Qukatie 11 месяцев назад
Родитель
Сommit
ca347fd6dc

+ 12 - 4
src/api/tirePartsMall/productionManagement/productionOrder/index.js

@@ -3,7 +3,7 @@ import request from '@/router/axios';
 //查询列表*
 export const getList = (current, size, params) => {
   return request({
-    url: '/api/blade-sales-part/productworkmanship/list',
+    url: '/api/blade-sales-part/productionOrder/listProduction',
     method: 'get',
     params: {
       ...params,
@@ -15,7 +15,15 @@ export const getList = (current, size, params) => {
 //删除*
 export const remove = (data) => {
   return request({
-    url: '/api/blade-sales-part/productworkmanship/remove',
+    url: '/api/blade-sales-part/productionOrder/removeProduction',
+    method: 'post',
+    params: data
+  })
+}
+//删除*
+export const itemsRemove = (data) => {
+  return request({
+    url: '/api/blade-sales-part/productworkmanshipitems/remove',
     method: 'post',
     params: data
   })
@@ -23,7 +31,7 @@ export const remove = (data) => {
 //*
 export const getDetail = (data) => {
   return request({
-    url: '/api/blade-sales-part/productworkmanship/detail',
+    url: '/api/blade-sales-part/productionOrder/detailProduction',
     method: 'get',
     params: data
   })
@@ -31,7 +39,7 @@ export const getDetail = (data) => {
 //*
 export const submit = (data) => {
   return request({
-    url: '/api/blade-sales-part/productworkmanship/submit',
+    url: '/api/blade-sales-part/productionOrder/submitProduction',
     method: 'POST',
     data: data
   })

+ 56 - 0
src/router/views/index.js

@@ -3933,4 +3933,60 @@ export default [{
     component: () => import( /* webpackChunkName: "views" */ '@/views/serviceConfiguration/modifyData/index')
   }]
 },
+{
+  path: '/tirePartsMall/productionManagement/productionOrder/index/serviceConfiguration/modifyData/index',
+  component: Layout,
+  hidden: true,
+  children: [{
+    path: '/tirePartsMall/productionManagement/productionOrder/index',
+    name: '生产订单(L)',
+    meta: {
+      i18n: '/tirePartsMall/productionManagement/productionOrder/index',
+      keepAlive: true,
+    },
+    component: () => import( /* webpackChunkName: "views" */ '@/views/tirePartsMall/productionManagement/productionOrder/index')
+  }]
+},
+{
+  path: '/tirePartsMall/productionManagement/productionOrder/index',
+  component: Layout,
+  hidden: true,
+  children: [{
+    path: '/tirePartsMall/productionManagement/productionOrder/index',
+    name: '生产订单(L)',
+    meta: {
+      i18n: '/tirePartsMall/productionManagement/productionOrder/index',
+      keepAlive: true,
+    },
+    component: () => import( /* webpackChunkName: "views" */ '@/views/tirePartsMall/productionManagement/productionOrder/index')
+  }]
+},
+{
+  path: '/tirePartsMall/productionManagement/productionPicking/index',
+  component: Layout,
+  hidden: true,
+  children: [{
+    path: '/tirePartsMall/productionManagement/productionPicking/index',
+    name: '生产领料(L)',
+    meta: {
+      i18n: '/tirePartsMall/productionManagement/productionPicking/index',
+      keepAlive: true,
+    },
+    component: () => import( /* webpackChunkName: "views" */ '@/views/tirePartsMall/productionManagement/productionPicking/index')
+  }]
+},
+{
+  path: '/tirePartsMall/productionManagement/productProcess/index',
+  component: Layout,
+  hidden: true,
+  children: [{
+    path: '/tirePartsMall/productionManagement/productProcess/index',
+    name: '产品工艺(L)',
+    meta: {
+      i18n: '/tirePartsMall/productionManagement/productProcess/index',
+      keepAlive: true,
+    },
+    component: () => import( /* webpackChunkName: "views" */ '@/views/tirePartsMall/productionManagement/productProcess/index')
+  }]
+},
 ]

+ 59 - 52
src/views/tirePartsMall/productionManagement/productProcess/detailsPage.vue

@@ -66,11 +66,14 @@
                         <avue-crud :option="optionBack" :data="form.craftItemsList" id="out-table"
                             @selection-change="selectionChange2">
                             <template slot="menuLeft">
+                                <el-button type="primary" size="small"
+                                    :disabled="editDisabled ||form.craftItemsList.length>0"
+                                    @click="allClick('默认模板')">默认模板</el-button>
                                 <el-button type="info" plain size="small" :disabled="editDisabled"
                                     @click="allClick('一键编辑2')">一键编辑</el-button>
                                 <el-button type="success" plain size="small" :disabled="editDisabled"
                                     @click="allClick('一键保存2')">一键保存</el-button>
-                                    <el-button type="danger" plain size="small" :disabled="editDisabled"
+                                <el-button type="danger" plain size="small" :disabled="editDisabled"
                                     @click="allClick('一键删除2')">一键删除</el-button>
                             </template>
                             <template slot="indexHeader" slot-scope="{row,index}">
@@ -120,54 +123,7 @@ export default {
             editButton: false,
             editDisabled: false,
             form: {
-                craftItemsList: [{
-                    productionProcesses: '采购部分工作(2月份工作)',
-                    assemblyMileageProgress: '光机采购'
-                },
-                {
-                    productionProcesses: '采购部分工作(2月份工作)',
-                    assemblyMileageProgress: '机加工钣金对照图纸检查与返修后检查'
-                },
-                {
-                    productionProcesses: '采购部分工作(2月份工作)',
-                    assemblyMileageProgress: '包装纸箱采购'
-                },
-                {
-                    productionProcesses: '采购部分工作(2月份工作)',
-                    assemblyMileageProgress: '其他配件清点以及补充采购'
-                },
-                {
-                    productionProcesses: '打印机子模组部分组装',
-                    assemblyMileageProgress: '横梁模组、滑台背板模组、滑台模组、料盘模组、成型平台模组、主框架模组、电器模组、刮刀模组、刮刀驱动电机传送带模组、亚克力模组'
-                },
-                {
-                    productionProcesses: '打印机整机部分组装',
-                    assemblyMileageProgress: '上述各个子模块之间的机械安装、光机模组、防尘罩模组、密封玻璃模组、配电盘模组、整个刮刀系统模组安装、背光灯板模组安装、刮刀系统限位开关模组'
-                },
-                {
-                    productionProcesses: '打印机整机接线部分组装',
-                    assemblyMileageProgress: '电机与驱动接线、光电开关接线、一体机接线、光机接线、设备外置接口接线、USB延长线接线、开关按钮接线、AC插座接线、刮刀系统接线、整理接线扎带固定接线'
-                },
-                {
-                    productionProcesses: '打印机整机调试部分组装',
-                    assemblyMileageProgress: '一体机配置调试、光机测试、刮刀系统部分调试、光机投影幅面、聚焦清晰度、光强均匀化、 大滑台电机驱动、刮刀电机驱动、打印机调平、刮刀高度、刮刀速度、打印机参数设置、打印机背光'
-                },
-                {
-                    productionProcesses: '打印机整机打印测试,验证问题补充调试',
-                    assemblyMileageProgress: '打印机空跑、打印机浆料、打印机背光、打印机刮刀、打印机成型、切片软件平台编辑、切片测试、打印机程序、打印精度'
-                },
-                {
-                    productionProcesses: '打印机外部与收尾装配',
-                    assemblyMileageProgress: '打印机外壳钣金、一体机固定、光机与一体机接线之间装配、电源开关 、USB接口、总电源开关固定到外壳钣金上、亚克力安装、设备清洗'
-                },
-                {
-                    productionProcesses: '备注',
-                    assemblyMileageProgress: ' 所有环节不是完成后才可进行下一环节,部分环节可以穿插进行'
-                },
-                {
-                    productionProcesses: '派单人确认签字',
-                    assemblyMileageProgress: ''
-                }],
+                craftItemsList: [],
                 attributeItemsList: []
             },
             oldForm: {
@@ -497,12 +453,64 @@ export default {
                     })
                     // 有id 的处理
                     if (itemsWithId.length != 0) {
-                        itemsRemove({ids:arrIds.join(',')}).then(res => {
+                        itemsRemove({ ids: arrIds.join(',') }).then(res => {
                             this.$message.success("操作成功!");
                         });
                     }
                 })
             }
+            if (name == '默认模板') {
+                this.form.craftItemsList.push(
+                    {
+                        productionProcesses: '采购部分工作(2月份工作)',
+                        assemblyMileageProgress: '光机采购'
+                    },
+                    {
+                        productionProcesses: '采购部分工作(2月份工作)',
+                        assemblyMileageProgress: '机加工钣金对照图纸检查与返修后检查'
+                    },
+                    {
+                        productionProcesses: '采购部分工作(2月份工作)',
+                        assemblyMileageProgress: '包装纸箱采购'
+                    },
+                    {
+                        productionProcesses: '采购部分工作(2月份工作)',
+                        assemblyMileageProgress: '其他配件清点以及补充采购'
+                    },
+                    {
+                        productionProcesses: '打印机子模组部分组装',
+                        assemblyMileageProgress: '横梁模组、滑台背板模组、滑台模组、料盘模组、成型平台模组、主框架模组、电器模组、刮刀模组、刮刀驱动电机传送带模组、亚克力模组'
+                    },
+                    {
+                        productionProcesses: '打印机整机部分组装',
+                        assemblyMileageProgress: '上述各个子模块之间的机械安装、光机模组、防尘罩模组、密封玻璃模组、配电盘模组、整个刮刀系统模组安装、背光灯板模组安装、刮刀系统限位开关模组'
+                    },
+                    {
+                        productionProcesses: '打印机整机接线部分组装',
+                        assemblyMileageProgress: '电机与驱动接线、光电开关接线、一体机接线、光机接线、设备外置接口接线、USB延长线接线、开关按钮接线、AC插座接线、刮刀系统接线、整理接线扎带固定接线'
+                    },
+                    {
+                        productionProcesses: '打印机整机调试部分组装',
+                        assemblyMileageProgress: '一体机配置调试、光机测试、刮刀系统部分调试、光机投影幅面、聚焦清晰度、光强均匀化、 大滑台电机驱动、刮刀电机驱动、打印机调平、刮刀高度、刮刀速度、打印机参数设置、打印机背光'
+                    },
+                    {
+                        productionProcesses: '打印机整机打印测试,验证问题补充调试',
+                        assemblyMileageProgress: '打印机空跑、打印机浆料、打印机背光、打印机刮刀、打印机成型、切片软件平台编辑、切片测试、打印机程序、打印精度'
+                    },
+                    {
+                        productionProcesses: '打印机外部与收尾装配',
+                        assemblyMileageProgress: '打印机外壳钣金、一体机固定、光机与一体机接线之间装配、电源开关 、USB接口、总电源开关固定到外壳钣金上、亚克力安装、设备清洗'
+                    },
+                    {
+                        productionProcesses: '备注',
+                        assemblyMileageProgress: '所有环节不是完成后才可进行下一环节,部分环节可以穿插进行'
+                    },
+                    {
+                        productionProcesses: '派单人确认签字',
+                        assemblyMileageProgress: ''
+                    }
+                )
+            }
             if (name == '一键保存2') {
                 this.form.craftItemsList.forEach(e => {
                     this.$set(e, "$cellEdit", false);
@@ -537,7 +545,7 @@ export default {
                     })
                     // 有id 的处理
                     if (itemsWithId.length != 0) {
-                        itemsRemove({ids:arrIds.join(',')}).then(res => {
+                        itemsRemove({ ids: arrIds.join(',') }).then(res => {
                             this.$message.success("操作成功!");
                         });
                     }
@@ -585,7 +593,6 @@ export default {
         },
         goBack(type) {
             this.$emit("goBack", type);
-            this.$emit('updateKey')
         },
     }
 }

+ 115 - 171
src/views/tirePartsMall/productionManagement/productionOrder/detailsPage.vue

@@ -31,9 +31,9 @@
                             :disabled="editDisabled"></dic-select>
                     </tempalte>
                     <tempalte slot="goodsName">
-                        <dicselect-product v-model="form.goodsName" placeholder="产品" key="id" label="cname"
-                            res="records" url="/blade-sales-part/goodsDesc/list?whetherIntegral=0&current=1&size=20"
-                            :filterable="true" :remote="true" dataName="cname" :searchShow="true"
+                        <dicselect-product v-model="form.goodsName" placeholder="产品" key="id" label="goodsName"
+                            res="records" url="/blade-sales-part/productworkmanship/list?current=1&size=20"
+                            :filterable="true" :remote="true" dataName="goodsName" :searchShow="true"
                             @selectChange="dicChange('goodsName', $event)" :disabled="editDisabled"></dicselect-product>
                     </tempalte>
                     <tempalte slot="userName">
@@ -47,10 +47,17 @@
             <trade-card title="明细信息">
                 <el-tabs v-model="activeName" type="card">
                     <el-tab-pane label="产品属性" name="first">
-                        <avue-crud :option="optionAttribute" :data="form.attributeItemsList" id="out-table">
+                        <avue-crud :option="optionAttribute" :data="form.attributeItemsList" id="out-table"
+                            @selection-change="selectionChange1">
                             <template slot="menuLeft">
-                                <el-button type="primary" size="small" :disabled="editDisabled"
-                                    @click="allClick('默认模板')">默认模板</el-button>
+                                <!-- <el-button type="primary" size="small" :disabled="editDisabled"
+                                    @click="allClick('默认模板')">默认模板</el-button> -->
+                                <el-button type="info" plain size="small" :disabled="editDisabled"
+                                    @click="allClick('一键编辑1')">一键编辑</el-button>
+                                <el-button type="success" plain size="small" :disabled="editDisabled"
+                                    @click="allClick('一键保存1')">一键保存</el-button>
+                                <el-button type="danger" plain size="small" :disabled="editDisabled"
+                                    @click="allClick('一键删除1')">一键删除</el-button>
                             </template>
                             <template slot="indexHeader" slot-scope="{row,index}">
                                 <el-button type="primary" size="mini" icon="el-icon-plus" :disabled="editDisabled"
@@ -72,14 +79,17 @@
                     </el-tab-pane>
                     <el-tab-pane label="工艺流程" name="second">
                         <avue-crud :option="option" :data="form.craftItemsList" id="out-table" ref="crud"
-                            @selection-change="selectionChange" @select="selectHandle" @row-update="rowUpdate"
+                            @selection-change="selectionChange2"
+                            @select="selectHandle" @row-update="rowUpdate"
                             @resetColumn="resetColumn('crud', 'option', 'optionBack', 440)"
                             @saveColumn="saveColumn('crud', 'option', 'optionBack', 440)">
                             <template slot="menuLeft">
                                 <el-button type="info" plain size="small" :disabled="editDisabled"
-                                    @click="allClick('一键编辑')">一键编辑</el-button>
+                                    @click="allClick('一键编辑2')">一键编辑</el-button>
                                 <el-button type="success" plain size="small" :disabled="editDisabled"
-                                    @click="allClick('一键保存')">一键保存</el-button>
+                                    @click="allClick('一键保存2')">一键保存</el-button>
+                                <el-button type="danger" plain size="small" :disabled="editDisabled"
+                                    @click="allClick('一键删除2')">一键删除</el-button>
                             </template>
                             <template slot="indexHeader" slot-scope="{row,index}">
                                 <el-button type="primary" size="mini" icon="el-icon-plus" :disabled="editDisabled"
@@ -106,7 +116,7 @@
 </template>
 
 <script>
-import { submit, getDetail, removeItem, } from "@/api/tradeAgency/tradeAgency";
+import { submit, getDetail, itemsRemove } from "@/api/tirePartsMall/productionManagement/productionOrder";
 import dicSelect from "@/components/dicSelect/main";
 import dicselectProduct from "@/components/dicSelect/mainProduct";
 import { getDicinit } from "@/api/dicSelect/index";
@@ -117,60 +127,14 @@ export default {
     name: "detailsPage",
     data() {
         return {
-            gridData:[],
+            gridData: [],
             activeName: 'first',
-            selectionList: [],
+            selectionList1: [],
+            selectionList2: [],
             editButton: false,
             editDisabled: false,
             form: {
-                craftItemsList: [{
-                    billNo: '采购部分工作(2月份工作)',
-                    boxType: '光机采购'
-                },
-                {
-                    billNo: '采购部分工作(2月份工作)',
-                    boxType: '机加工钣金对照图纸检查与返修后检查'
-                },
-                {
-                    billNo: '采购部分工作(2月份工作)',
-                    boxType: '包装纸箱采购'
-                },
-                {
-                    billNo: '采购部分工作(2月份工作)',
-                    boxType: '其他配件清点以及补充采购'
-                },
-                {
-                    billNo: '打印机子模组部分组装',
-                    boxType: '横梁模组、滑台背板模组、滑台模组、料盘模组、成型平台模组、主框架模组、电器模组、刮刀模组、刮刀驱动电机传送带模组、亚克力模组'
-                },
-                {
-                    billNo: '打印机整机部分组装',
-                    boxType: '上述各个子模块之间的机械安装、光机模组、防尘罩模组、密封玻璃模组、配电盘模组、整个刮刀系统模组安装、背光灯板模组安装、刮刀系统限位开关模组'
-                },
-                {
-                    billNo: '打印机整机接线部分组装',
-                    boxType: '电机与驱动接线、光电开关接线、一体机接线、光机接线、设备外置接口接线、USB延长线接线、开关按钮接线、AC插座接线、刮刀系统接线、整理接线扎带固定接线'
-                },
-                {
-                    billNo: '打印机整机调试部分组装',
-                    boxType: '一体机配置调试、光机测试、刮刀系统部分调试、光机投影幅面、聚焦清晰度、光强均匀化、 大滑台电机驱动、刮刀电机驱动、打印机调平、刮刀高度、刮刀速度、打印机参数设置、打印机背光'
-                },
-                {
-                    billNo: '打印机整机打印测试,验证问题补充调试',
-                    boxType: '打印机空跑、打印机浆料、打印机背光、打印机刮刀、打印机成型、切片软件平台编辑、切片测试、打印机程序、打印精度'
-                },
-                {
-                    billNo: '打印机外部与收尾装配',
-                    boxType: '打印机外壳钣金、一体机固定、光机与一体机接线之间装配、电源开关 、USB接口、总电源开关固定到外壳钣金上、亚克力安装、设备清洗'
-                },
-                {
-                    billNo: '备注',
-                    boxType: ' 所有环节不是完成后才可进行下一环节,部分环节可以穿插进行'
-                },
-                {
-                    billNo: '派单人确认签字',
-                    boxType: ''
-                }],
+                craftItemsList: [],
                 attributeItemsList: []
             },
             oldForm: {
@@ -250,8 +214,9 @@ export default {
             optionBack: {
                 height: 'auto',
                 calcHeight: 30,
-                menuWidth: 240,
+                menuWidth: 120,
                 // index:true,
+                selection: true,
                 tip: false,
                 border: true,
                 addBtn: false,
@@ -259,7 +224,6 @@ export default {
                 editBtn: false,
                 delBtn: false,
                 refreshBtn: false,
-                selection: true,
                 align: 'center',
                 column: [
                     {
@@ -270,13 +234,13 @@ export default {
                     },
                     {
                         label: "工序",
-                        prop: "billNo",
+                        prop: "productionProcesses",
                         overHidden: true,
                         cell: true
                     },
                     {
                         label: "组装里程进度",
-                        prop: "boxType",
+                        prop: "assemblyMileageProgress",
                         overHidden: true,
                         cell: true
                     },
@@ -311,6 +275,7 @@ export default {
                 calcHeight: 30,
                 menuWidth: 120,
                 // index:true,
+                selection: true,
                 tip: false,
                 border: true,
                 addBtn: false,
@@ -329,22 +294,22 @@ export default {
                     },
                     {
                         label: "属性编号",
-                        prop: "prop",
+                        prop: "attributeNo",
                         overHidden: true,
                         cell: true
                     },
                     {
                         label: "属性名称",
-                        prop: "label",
+                        prop: "attributeName",
                         overHidden: true,
                         cell: true
                     },
                     {
                         label: "属性值",
-                        prop: "boxNo",
+                        prop: "attributeValue",
                         overHidden: true,
                         cell: true
-                    }
+                    },
                 ]
             },
             showLock: false,
@@ -368,31 +333,6 @@ export default {
         }
     },
     methods: {
-        inLock() {
-            const data = {
-                moduleName: "MYDL",
-                tableName: "MYDL_Detail",
-                billId: this.form.id,
-                no: localStorage.getItem("browserID"),
-                billNo: this.form.contractNo
-            };
-            this.inDetailsKey(this.$route.name, {
-                moduleName: "MYDL",
-                tableName: "MYDL_Detail",
-                billId: this.form.id,
-                billNo: this.form.contractNo
-
-            });
-            this.checkLock(data).then(res => {
-                if (res.data.code == 200) {
-                    this.onLock(data).then(res => {
-                        if (res.data.code == 200) {
-                            this.showLock = false
-                        }
-                    });
-                }
-            });
-        },
         dicChange(name, row) {
             if (name == 'corpName') {
                 if (row) {
@@ -430,7 +370,7 @@ export default {
                 type: "warning"
             }).then(() => {
                 if (row.id) {
-                    removeItem({ ids: row.id }).then(res => {
+                    itemsRemove({ ids: row.id }).then(res => {
                         this.form.craftItemsList.splice(index, 1);
                         this.$message.success("成功删除");
                     })
@@ -459,7 +399,7 @@ export default {
                 type: "warning"
             }).then(() => {
                 if (row.id) {
-                    removeItem({ ids: row.id }).then(res => {
+                    itemsRemove({ ids: row.id }).then(res => {
                         this.form.attributeItemsList.splice(index, 1);
                         this.$message.success("成功删除");
                     })
@@ -469,8 +409,11 @@ export default {
 
             });
         },
-        selectionChange(list) {
-            this.selectionList = list;
+        selectionChange1(list) {
+            this.selectionList1 = list;
+        },
+        selectionChange2(list) {
+            this.selectionList2 = list;
         },
         getDetails(id) {
             const loading = this.$loading({
@@ -481,8 +424,6 @@ export default {
             });
             getDetail({ id: id }).then(res => {
                 this.form = res.data.data
-                this.oldForm = this.deepClone(res.data.data)
-                this.inLock()
             }).finally(() => {
                 loading.close()
             })
@@ -496,74 +437,90 @@ export default {
         },
 
         allClick(name) {
-            if (name == '一键保存') {
-                for (let row of this.form.craftItemsList) {
-                    if (!row.boxNo) {
-                        this.$refs.crud.rowCell(row, row.$index)
-                        return this.$message.error("请完善明细信息");
+            if (name == '一键保存1') {
+                this.form.attributeItemsList.forEach(e => {
+                    this.$set(e, "$cellEdit", false);
+                })
+            }
+            if (name == '一键编辑1') {
+                this.form.attributeItemsList.forEach(e => {
+                    this.$set(e, "$cellEdit", true);
+                })
+            }
+            if (name == '一键删除1') {
+                if (this.selectionList1.length == 0) {
+                    return this.$message.warning('请选择要删除的数据')
+                }
+                this.$confirm("确定将选择数据删除?", {
+                    confirmButtonText: "确定",
+                    cancelButtonText: "取消",
+                    type: "warning"
+                }).then(() => {
+                    let multiList = this.selectionList1
+                    let arr = this.form.attributeItemsList
+                    // 获取有id 的数据
+                    const itemsWithId = multiList.filter(item => item.hasOwnProperty('id'));
+                    let arrIds = itemsWithId.map(item => item.id) // 获取id 数据
+                    // 把选中的删除掉
+                    multiList.forEach((item) => {
+                        for (let index in arr) {
+                            if (JSON.stringify(item) == JSON.stringify(arr[index])) {
+                                arr.splice(Number(index), 1)
+                            }
+                        }
+                    })
+                    // 有id 的处理
+                    if (itemsWithId.length != 0) {
+                        itemsRemove({ ids: arrIds.join(',') }).then(res => {
+                            this.$message.success("操作成功!");
+                        });
                     }
+                })
+            }
+            if (name == '一键保存2') {
+                for (let row of this.form.craftItemsList) {
+                    // if (!row.boxNo) {
+                    //     this.$refs.crud.rowCell(row, row.$index)
+                    //     return this.$message.error("请完善明细信息");
+                    // }
                     this.$set(row, "$cellEdit", false);
                 }
-                this.submit()
+                // this.submit()
             }
-            if (name == '一键编辑') {
+            if (name == '一键编辑2') {
                 this.form.craftItemsList.forEach(e => {
                     this.$set(e, "$cellEdit", true);
                 })
             }
-            if (name == '默认模板') {
-                this.form.attributeItemsList.push(
-                    {
-                        label: '打印尺寸',
-                        prop: "name1",
-                        $cellEdit: true
-                    },
-                    {
-                        label: '设备尺寸',
-                        prop: "name2",
-                        $cellEdit: true
-                    },
-                    {
-                        label: '曝光分辨率',
-                        prop: "name3",
-                        $cellEdit: true
-                    },
-                    {
-                        label: '打印速度',
-                        prop: "name4",
-                        $cellEdit: true
-                    },
-                    {
-                        label: '设备总重',
-                        prop: "name5",
-                        $cellEdit: true
-                    },
-                    {
-                        label: '波长',
-                        prop: "name6",
-                        $cellEdit: true
-                    },
-                    {
-                        label: '层重',
-                        prop: "name7",
-                        $cellEdit: true
-                    },
-                    {
-                        label: '刮刀数量',
-                        prop: "name8",
-                        $cellEdit: true
-                    },
-                    {
-                        label: '加料方式',
-                        prop: "name9",
-                        $cellEdit: true
-                    },
-                    {
-                        label: '适用材料',
-                        prop: "name10",
-                        $cellEdit: true
+            if (name == '一键删除2') {
+                if (this.selectionList2.length == 0) {
+                    return this.$message.warning('请选择要删除的数据')
+                }
+                this.$confirm("确定将选择数据删除?", {
+                    confirmButtonText: "确定",
+                    cancelButtonText: "取消",
+                    type: "warning"
+                }).then(() => {
+                    let multiList = this.selectionList2
+                    let arr = this.form.craftItemsList
+                    // 获取有id 的数据
+                    const itemsWithId = multiList.filter(item => item.hasOwnProperty('id'));
+                    let arrIds = itemsWithId.map(item => item.id) // 获取id 数据
+                    // 把选中的删除掉
+                    multiList.forEach((item) => {
+                        for (let index in arr) {
+                            if (JSON.stringify(item) == JSON.stringify(arr[index])) {
+                                arr.splice(Number(index), 1)
+                            }
+                        }
+                    })
+                    // 有id 的处理
+                    if (itemsWithId.length != 0) {
+                        itemsRemove({ ids: arrIds.join(',') }).then(res => {
+                            this.$message.success("操作成功!");
+                        });
                     }
-                )
+                })
             }
         },
         submit(type) {
@@ -586,18 +543,6 @@ export default {
                         this.form.businessDate = this.form.contractDate
                         submit(this.form).then(res => {
                             this.$message.success("保存成功");
-                            if (type == 'goBack') {
-                                if (this.form.id) {
-                                    this.unLock({
-                                        moduleName: "MYDL",
-                                        tableName: "MYDL_Detail",
-                                        billId: this.form.id,
-                                        billNo: this.form.contractNo
-                                    });
-                                }
-                                this.$emit("goBack", type);
-                                this.$emit('updateKey')
-                            }
                             this.getDetails(res.data.data.id)
                         }).finally(() => {
                             loading.close();
@@ -629,7 +574,6 @@ export default {
         },
         goBack(type) {
             this.$emit("goBack", type);
-            this.$emit('updateKey')
         },
     }
 }

+ 1 - 1
src/views/tirePartsMall/productionManagement/productionOrder/index.vue

@@ -26,7 +26,7 @@
 </template>
 
 <script>
-import { getList, remove } from "@/api/tradeAgency/tradeAgency";
+import { getList, remove } from "@/api/tirePartsMall/productionManagement/productionOrder";
 import { getWorkDicts } from "@/api/system/dictbiz";
 import detailsPage from "./detailsPage";
 import { getToken } from "@/util/auth";