|
|
@@ -24,21 +24,20 @@
|
|
|
:filterable="true" :remote="true" dataName="cname"
|
|
|
@selectChange="dicChange('goodsName', $event)" :disabled="editDisabled"></dic-select>
|
|
|
</tempalte>
|
|
|
- <tempalte slot="userName">
|
|
|
- <dic-select v-model="form.userName" placeholder="派单人" key="id" label="realName" res="records"
|
|
|
- url="/blade-user/page?current=1&size=20" :filterable="true" :remote="true"
|
|
|
- dataName="realName" @selectChange="dicChange('userName', $event)"
|
|
|
- :disabled="editDisabled"></dic-select>
|
|
|
- </tempalte>
|
|
|
</avue-form>
|
|
|
</trade-card>
|
|
|
<trade-card title="明细信息">
|
|
|
<el-tabs v-model="activeName" type="card">
|
|
|
<el-tab-pane label="产品属性" name="first">
|
|
|
- <avue-crud :option="optionAttribute" :data="form.attributeList" 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="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"
|
|
|
@@ -48,6 +47,11 @@
|
|
|
<template slot="index" slot-scope="{row,index}">
|
|
|
<span>{{ index + 1 }}</span>
|
|
|
</template>
|
|
|
+ <template slot="whetherOpen" slot-scope="{row,index}">
|
|
|
+ <el-switch v-model="row.whetherOpen" active-text="开" inactive-text="关"
|
|
|
+ :disabled="!row.$cellEdit" active-value="1" inactive-value="0">
|
|
|
+ </el-switch>
|
|
|
+ </template>
|
|
|
<template slot="menu" slot-scope="{ row, index }">
|
|
|
<el-button size="small" :icon="row.$cellEdit ? 'el-icon-plus' : 'el-icon-edit'"
|
|
|
type="text" :disabled="editDisabled" @click="rowEdit2(row, index)">
|
|
|
@@ -59,20 +63,26 @@
|
|
|
</avue-crud>
|
|
|
</el-tab-pane>
|
|
|
<el-tab-pane label="工艺流程" name="second">
|
|
|
- <avue-crud :option="option" :data="form.agentItemsList" id="out-table" ref="crud"
|
|
|
- @resetColumn="resetColumn('crud', 'option', 'optionBack', 444)"
|
|
|
- @saveColumn="saveColumn('crud', 'option', 'optionBack', 444)">
|
|
|
+ <avue-crud :option="optionBack" :data="form.craftItemsList" id="out-table"
|
|
|
+ @selection-change="selectionChange2">
|
|
|
<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"
|
|
|
circle @click="addRow()">
|
|
|
</el-button>
|
|
|
</template>
|
|
|
+ <template slot="whetherOpen" slot-scope="{row,index}">
|
|
|
+ <el-switch v-model="row.whetherOpen" active-text="开" inactive-text="关"
|
|
|
+ :disabled="!row.$cellEdit" active-value="1" inactive-value="0">
|
|
|
+ </el-switch>
|
|
|
+ </template>
|
|
|
<template slot="index" slot-scope="{row,index}">
|
|
|
<span>{{ index + 1 }}</span>
|
|
|
</template>
|
|
|
@@ -94,7 +104,7 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import { submit, getDetail, removeItem, } from "@/api/tradeAgency/tradeAgency";
|
|
|
+import { submit, getDetail, itemsRemove } from "@/api/tirePartsMall/productionManagement/productProcess";
|
|
|
import dicSelect from "@/components/dicSelect/main";
|
|
|
import { getDicinit } from "@/api/dicSelect/index";
|
|
|
import { dateFormat } from "@/util/date";
|
|
|
@@ -105,63 +115,64 @@ export default {
|
|
|
data() {
|
|
|
return {
|
|
|
activeName: 'first',
|
|
|
- selectionList: [],
|
|
|
+ selectionList1: [],
|
|
|
+ selectionList2: [],
|
|
|
editButton: false,
|
|
|
editDisabled: false,
|
|
|
form: {
|
|
|
- agentItemsList: [{
|
|
|
- billNo: '采购部分工作(2月份工作)',
|
|
|
- boxType: '光机采购'
|
|
|
+ craftItemsList: [{
|
|
|
+ productionProcesses: '采购部分工作(2月份工作)',
|
|
|
+ assemblyMileageProgress: '光机采购'
|
|
|
},
|
|
|
{
|
|
|
- billNo: '采购部分工作(2月份工作)',
|
|
|
- boxType: '机加工钣金对照图纸检查与返修后检查'
|
|
|
+ productionProcesses: '采购部分工作(2月份工作)',
|
|
|
+ assemblyMileageProgress: '机加工钣金对照图纸检查与返修后检查'
|
|
|
},
|
|
|
{
|
|
|
- billNo: '采购部分工作(2月份工作)',
|
|
|
- boxType: '包装纸箱采购'
|
|
|
+ productionProcesses: '采购部分工作(2月份工作)',
|
|
|
+ assemblyMileageProgress: '包装纸箱采购'
|
|
|
},
|
|
|
{
|
|
|
- billNo: '采购部分工作(2月份工作)',
|
|
|
- boxType: '其他配件清点以及补充采购'
|
|
|
+ productionProcesses: '采购部分工作(2月份工作)',
|
|
|
+ assemblyMileageProgress: '其他配件清点以及补充采购'
|
|
|
},
|
|
|
{
|
|
|
- billNo: '打印机子模组部分组装',
|
|
|
- boxType: '横梁模组、滑台背板模组、滑台模组、料盘模组、成型平台模组、主框架模组、电器模组、刮刀模组、刮刀驱动电机传送带模组、亚克力模组'
|
|
|
+ productionProcesses: '打印机子模组部分组装',
|
|
|
+ assemblyMileageProgress: '横梁模组、滑台背板模组、滑台模组、料盘模组、成型平台模组、主框架模组、电器模组、刮刀模组、刮刀驱动电机传送带模组、亚克力模组'
|
|
|
},
|
|
|
{
|
|
|
- billNo: '打印机整机部分组装',
|
|
|
- boxType: '上述各个子模块之间的机械安装、光机模组、防尘罩模组、密封玻璃模组、配电盘模组、整个刮刀系统模组安装、背光灯板模组安装、刮刀系统限位开关模组'
|
|
|
+ productionProcesses: '打印机整机部分组装',
|
|
|
+ assemblyMileageProgress: '上述各个子模块之间的机械安装、光机模组、防尘罩模组、密封玻璃模组、配电盘模组、整个刮刀系统模组安装、背光灯板模组安装、刮刀系统限位开关模组'
|
|
|
},
|
|
|
{
|
|
|
- billNo: '打印机整机接线部分组装',
|
|
|
- boxType: '电机与驱动接线、光电开关接线、一体机接线、光机接线、设备外置接口接线、USB延长线接线、开关按钮接线、AC插座接线、刮刀系统接线、整理接线扎带固定接线'
|
|
|
+ productionProcesses: '打印机整机接线部分组装',
|
|
|
+ assemblyMileageProgress: '电机与驱动接线、光电开关接线、一体机接线、光机接线、设备外置接口接线、USB延长线接线、开关按钮接线、AC插座接线、刮刀系统接线、整理接线扎带固定接线'
|
|
|
},
|
|
|
{
|
|
|
- billNo: '打印机整机调试部分组装',
|
|
|
- boxType: '一体机配置调试、光机测试、刮刀系统部分调试、光机投影幅面、聚焦清晰度、光强均匀化、 大滑台电机驱动、刮刀电机驱动、打印机调平、刮刀高度、刮刀速度、打印机参数设置、打印机背光'
|
|
|
+ productionProcesses: '打印机整机调试部分组装',
|
|
|
+ assemblyMileageProgress: '一体机配置调试、光机测试、刮刀系统部分调试、光机投影幅面、聚焦清晰度、光强均匀化、 大滑台电机驱动、刮刀电机驱动、打印机调平、刮刀高度、刮刀速度、打印机参数设置、打印机背光'
|
|
|
},
|
|
|
{
|
|
|
- billNo: '打印机整机打印测试,验证问题补充调试',
|
|
|
- boxType: '打印机空跑、打印机浆料、打印机背光、打印机刮刀、打印机成型、切片软件平台编辑、切片测试、打印机程序、打印精度'
|
|
|
+ productionProcesses: '打印机整机打印测试,验证问题补充调试',
|
|
|
+ assemblyMileageProgress: '打印机空跑、打印机浆料、打印机背光、打印机刮刀、打印机成型、切片软件平台编辑、切片测试、打印机程序、打印精度'
|
|
|
},
|
|
|
{
|
|
|
- billNo: '打印机外部与收尾装配',
|
|
|
- boxType: '打印机外壳钣金、一体机固定、光机与一体机接线之间装配、电源开关 、USB接口、总电源开关固定到外壳钣金上、亚克力安装、设备清洗'
|
|
|
+ productionProcesses: '打印机外部与收尾装配',
|
|
|
+ assemblyMileageProgress: '打印机外壳钣金、一体机固定、光机与一体机接线之间装配、电源开关 、USB接口、总电源开关固定到外壳钣金上、亚克力安装、设备清洗'
|
|
|
},
|
|
|
{
|
|
|
- billNo: '备注',
|
|
|
- boxType: ' 所有环节不是完成后才可进行下一环节,部分环节可以穿插进行'
|
|
|
+ productionProcesses: '备注',
|
|
|
+ assemblyMileageProgress: ' 所有环节不是完成后才可进行下一环节,部分环节可以穿插进行'
|
|
|
},
|
|
|
{
|
|
|
- billNo: '派单人确认签字',
|
|
|
- boxType: ''
|
|
|
+ productionProcesses: '派单人确认签字',
|
|
|
+ assemblyMileageProgress: ''
|
|
|
}],
|
|
|
- attributeList: []
|
|
|
+ attributeItemsList: []
|
|
|
},
|
|
|
oldForm: {
|
|
|
- agentItemsList: [],
|
|
|
- attributeList: []
|
|
|
+ craftItemsList: [],
|
|
|
+ attributeItemsList: []
|
|
|
},
|
|
|
optionForm: {
|
|
|
menuBtn: false,
|
|
|
@@ -177,7 +188,34 @@ export default {
|
|
|
message: " ",
|
|
|
trigger: "blur"
|
|
|
}]
|
|
|
- }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '创建人',
|
|
|
+ prop: "createUserName",
|
|
|
+ disabled: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '创建时间',
|
|
|
+ prop: "createTime",
|
|
|
+ disabled: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '更新人',
|
|
|
+ prop: "updateUserName",
|
|
|
+ disabled: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '更新时间',
|
|
|
+ prop: "updateTime",
|
|
|
+ disabled: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '备注',
|
|
|
+ prop: "remarks",
|
|
|
+ type: 'textarea',
|
|
|
+ minRows: 2,
|
|
|
+ disabled: false,
|
|
|
+ },
|
|
|
]
|
|
|
},
|
|
|
option: {},
|
|
|
@@ -186,6 +224,7 @@ export default {
|
|
|
calcHeight: 30,
|
|
|
menuWidth: 120,
|
|
|
// index:true,
|
|
|
+ selection: true,
|
|
|
tip: false,
|
|
|
border: true,
|
|
|
addBtn: false,
|
|
|
@@ -193,6 +232,7 @@ export default {
|
|
|
editBtn: false,
|
|
|
delBtn: false,
|
|
|
refreshBtn: false,
|
|
|
+ columnBtn: false,
|
|
|
align: 'center',
|
|
|
column: [
|
|
|
{
|
|
|
@@ -203,25 +243,27 @@ export default {
|
|
|
},
|
|
|
{
|
|
|
label: "工序",
|
|
|
- prop: "billNo",
|
|
|
+ prop: "productionProcesses",
|
|
|
overHidden: true,
|
|
|
cell: true
|
|
|
},
|
|
|
{
|
|
|
label: "组装里程进度",
|
|
|
- prop: "boxType",
|
|
|
- overHidden: true,
|
|
|
- cell: true
|
|
|
- },
|
|
|
- {
|
|
|
- label: "预计时间(字符)",
|
|
|
- prop: "boxNo",
|
|
|
+ prop: "assemblyMileageProgress",
|
|
|
overHidden: true,
|
|
|
cell: true
|
|
|
},
|
|
|
{
|
|
|
- label: "实际时间 (字符)",
|
|
|
- prop: "invoiceNo",
|
|
|
+ label: "是否开启",
|
|
|
+ prop: "whetherOpen",
|
|
|
+ type: 'switch',
|
|
|
+ dicData: [{
|
|
|
+ label: '关',
|
|
|
+ value: '0'
|
|
|
+ }, {
|
|
|
+ label: '开',
|
|
|
+ value: '1'
|
|
|
+ }],
|
|
|
overHidden: true,
|
|
|
cell: true
|
|
|
}
|
|
|
@@ -233,6 +275,7 @@ export default {
|
|
|
calcHeight: 30,
|
|
|
menuWidth: 120,
|
|
|
// index:true,
|
|
|
+ selection: true,
|
|
|
tip: false,
|
|
|
border: true,
|
|
|
addBtn: false,
|
|
|
@@ -251,32 +294,32 @@ 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
|
|
|
},
|
|
|
{
|
|
|
label: "是否开启",
|
|
|
- prop: "status",
|
|
|
+ prop: "whetherOpen",
|
|
|
type: 'switch',
|
|
|
dicData: [{
|
|
|
label: '关',
|
|
|
- value: 0
|
|
|
+ value: '0'
|
|
|
}, {
|
|
|
label: '开',
|
|
|
- value: 1
|
|
|
+ value: '1'
|
|
|
}],
|
|
|
overHidden: true,
|
|
|
cell: true
|
|
|
@@ -292,9 +335,7 @@ export default {
|
|
|
detailData: Object
|
|
|
},
|
|
|
async created() {
|
|
|
- this.option = await this.getColumnData(this.getColumnName(444), this.optionBack);
|
|
|
if (this.detailData.id) {
|
|
|
- this.showLock = true;
|
|
|
this.editButton = true
|
|
|
this.editDisabled = true
|
|
|
this.optionForm.disabled = true
|
|
|
@@ -328,25 +369,18 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
dicChange(name, row) {
|
|
|
- if (name == 'corpName') {
|
|
|
- if (row) {
|
|
|
- this.form.corpId = row.id
|
|
|
- this.form.corpName = row.cname
|
|
|
- } else {
|
|
|
- this.form.corpId = null
|
|
|
- }
|
|
|
- }
|
|
|
if (name == 'goodsName') {
|
|
|
if (row) {
|
|
|
this.form.goodsId = row.id
|
|
|
this.form.goodsName = row.cname
|
|
|
} else {
|
|
|
this.form.goodsId = null
|
|
|
+ this.form.goodsName = null
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
addRow() {
|
|
|
- this.form.agentItemsList.push({
|
|
|
+ this.form.craftItemsList.push({
|
|
|
$cellEdit: true
|
|
|
})
|
|
|
},
|
|
|
@@ -364,17 +398,17 @@ export default {
|
|
|
type: "warning"
|
|
|
}).then(() => {
|
|
|
if (row.id) {
|
|
|
- removeItem({ ids: row.id }).then(res => {
|
|
|
- this.form.agentItemsList.splice(index, 1);
|
|
|
+ itemsRemove({ ids: row.id }).then(res => {
|
|
|
+ this.form.craftItemsList.splice(index, 1);
|
|
|
this.$message.success("成功删除");
|
|
|
})
|
|
|
} else {
|
|
|
- this.form.agentItemsList.splice(index, 1);
|
|
|
+ this.form.craftItemsList.splice(index, 1);
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
addRow2() {
|
|
|
- this.form.attributeList.push({
|
|
|
+ this.form.attributeItemsList.push({
|
|
|
$cellEdit: true
|
|
|
})
|
|
|
},
|
|
|
@@ -392,18 +426,21 @@ export default {
|
|
|
type: "warning"
|
|
|
}).then(() => {
|
|
|
if (row.id) {
|
|
|
- removeItem({ ids: row.id }).then(res => {
|
|
|
- this.form.attributeList.splice(index, 1);
|
|
|
+ itemsRemove({ ids: row.id }).then(res => {
|
|
|
+ this.form.attributeItemsList.splice(index, 1);
|
|
|
this.$message.success("成功删除");
|
|
|
})
|
|
|
} else {
|
|
|
- this.form.attributeList.splice(index, 1);
|
|
|
+ this.form.attributeItemsList.splice(index, 1);
|
|
|
}
|
|
|
|
|
|
});
|
|
|
},
|
|
|
- selectionChange(list) {
|
|
|
- this.selectionList = list;
|
|
|
+ selectionChange1(list) {
|
|
|
+ this.selectionList1 = list;
|
|
|
+ },
|
|
|
+ selectionChange2(list) {
|
|
|
+ this.selectionList2 = list;
|
|
|
},
|
|
|
getDetails(id) {
|
|
|
const loading = this.$loading({
|
|
|
@@ -415,128 +452,114 @@ export default {
|
|
|
getDetail({ id: id }).then(res => {
|
|
|
this.form = res.data.data
|
|
|
this.oldForm = this.deepClone(res.data.data)
|
|
|
- this.inLock()
|
|
|
}).finally(() => {
|
|
|
loading.close()
|
|
|
})
|
|
|
},
|
|
|
inEdit() {
|
|
|
this.editButton = false
|
|
|
- if (this.form.businessStatus == '录入') {
|
|
|
- this.editDisabled = false
|
|
|
- this.optionForm.disabled = false
|
|
|
- }
|
|
|
+ this.editDisabled = false
|
|
|
+ this.optionForm.disabled = false
|
|
|
},
|
|
|
|
|
|
allClick(name) {
|
|
|
- if (name == '一键保存') {
|
|
|
- for (let row of this.form.agentItemsList) {
|
|
|
- // if (!row.boxNo) {
|
|
|
- // this.$refs.crud.rowCell(row, row.$index)
|
|
|
- // return this.$message.error("请完善明细信息");
|
|
|
- // }
|
|
|
- this.$set(row, "$cellEdit", false);
|
|
|
+ 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.submit()
|
|
|
+ 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 == '一键编辑') {
|
|
|
- this.form.agentItemsList.forEach(e => {
|
|
|
+ if (name == '一键保存2') {
|
|
|
+ this.form.craftItemsList.forEach(e => {
|
|
|
+ this.$set(e, "$cellEdit", false);
|
|
|
+ })
|
|
|
+ }
|
|
|
+ if (name == '一键编辑2') {
|
|
|
+ this.form.craftItemsList.forEach(e => {
|
|
|
this.$set(e, "$cellEdit", true);
|
|
|
})
|
|
|
}
|
|
|
- if (name == '默认模板') {
|
|
|
- this.form.attributeList.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) {
|
|
|
this.$refs["form"].validate((valid, done) => {
|
|
|
done();
|
|
|
if (valid) {
|
|
|
- // for (let row of this.form.agentItemsList) {
|
|
|
- // if (!row.billNo || !row.boxType || !row.boxNo || !row.hsCode || !row.goodsType || !row.quantity || !row.netWeight || !row.price || !row.grossWeight) {
|
|
|
- // this.$refs.crud.rowCell(row, row.$index)
|
|
|
- // return this.$message.error("请完善明细信息");
|
|
|
- // }
|
|
|
- // }
|
|
|
- if (this.$refs.feeInfo.submitValidate()) {
|
|
|
- const loading = this.$loading({
|
|
|
- lock: true,
|
|
|
- text: '加载中',
|
|
|
- spinner: 'el-icon-loading',
|
|
|
- background: 'rgba(255,255,255,0.7)'
|
|
|
- });
|
|
|
- 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();
|
|
|
- })
|
|
|
- }
|
|
|
-
|
|
|
+ const loading = this.$loading({
|
|
|
+ lock: true,
|
|
|
+ text: '加载中',
|
|
|
+ spinner: 'el-icon-loading',
|
|
|
+ background: 'rgba(255,255,255,0.7)'
|
|
|
+ });
|
|
|
+ submit(this.form).then(res => {
|
|
|
+ this.$message.success("保存成功");
|
|
|
+ this.getDetails(res.data.data.id)
|
|
|
+ }).finally(() => {
|
|
|
+ loading.close();
|
|
|
+ })
|
|
|
} else {
|
|
|
return false;
|
|
|
}
|