|
@@ -263,10 +263,10 @@ export default {
|
|
|
|
|
|
return {
|
|
return {
|
|
|
|
|
|
- toolbarConfig: {
|
|
|
|
- // add 新增按钮;remove 删除按钮;clearSelection 清空选择按钮
|
|
|
|
- btn: []
|
|
|
|
- },
|
|
|
|
|
|
+ // toolbarConfig: {
|
|
|
|
+ // // add 新增按钮;remove 删除按钮;clearSelection 清空选择按钮
|
|
|
|
+ // btn: []
|
|
|
|
+ // },
|
|
// 表头
|
|
// 表头
|
|
clothesAddColumns: [
|
|
clothesAddColumns: [
|
|
{
|
|
{
|
|
@@ -371,7 +371,7 @@ export default {
|
|
title: '颜色(中英文)',
|
|
title: '颜色(中英文)',
|
|
key: 'colour',
|
|
key: 'colour',
|
|
width: 140,
|
|
width: 140,
|
|
- type: JVXETypes.normal,
|
|
|
|
|
|
+ type: JVXETypes.input,
|
|
},
|
|
},
|
|
{
|
|
{
|
|
title: '配码',
|
|
title: '配码',
|
|
@@ -618,8 +618,10 @@ export default {
|
|
|
|
|
|
// -------------------------------------
|
|
// -------------------------------------
|
|
// 操作 删除
|
|
// 操作 删除
|
|
- handleDelete(id) {
|
|
|
|
- console.log('id:', id)
|
|
|
|
|
|
+ handleDelete(ind) {
|
|
|
|
+ var delectId = ind.rowIndex
|
|
|
|
+ this.clothesAddData.splice(delectId, 1);
|
|
|
|
+ console.log(this.clothesAddData)
|
|
},
|
|
},
|
|
|
|
|
|
handleValueChange(event) {
|
|
handleValueChange(event) {
|
|
@@ -650,7 +652,11 @@ export default {
|
|
},
|
|
},
|
|
|
|
|
|
// 操作按钮 复制
|
|
// 操作按钮 复制
|
|
- copy(record) {},
|
|
|
|
|
|
+ copy(record) {
|
|
|
|
+ var newRow = JSON.parse(JSON.stringify(record.row));
|
|
|
|
+ newRow.isAdd = 1
|
|
|
|
+ this.clothesAddData.push(newRow);
|
|
|
|
+ },
|
|
// -------------------------------------
|
|
// -------------------------------------
|
|
|
|
|
|
// 抽屉 取消
|
|
// 抽屉 取消
|
|
@@ -681,6 +687,7 @@ export default {
|
|
newObj.garmentFactory = this.clothesAdd.clothesFactory
|
|
newObj.garmentFactory = this.clothesAdd.clothesFactory
|
|
newObj.exportInvoiceNo = this.clothesAdd.exportInvoiceNo
|
|
newObj.exportInvoiceNo = this.clothesAdd.exportInvoiceNo
|
|
newObj.shippingOrderNumber = this.clothesAdd.bookNum
|
|
newObj.shippingOrderNumber = this.clothesAdd.bookNum
|
|
|
|
+ newObj.id = this.clothesAdd.id
|
|
newObj.syPackingListTailoringItemList = this.clothesAddData
|
|
newObj.syPackingListTailoringItemList = this.clothesAddData
|
|
var sort = 0;
|
|
var sort = 0;
|
|
for (var i=0; i<newObj.syPackingListTailoringItemList.length;i++){
|
|
for (var i=0; i<newObj.syPackingListTailoringItemList.length;i++){
|
|
@@ -738,34 +745,34 @@ export default {
|
|
var sizeTable = tableRow.sizeTables[j];
|
|
var sizeTable = tableRow.sizeTables[j];
|
|
var field = 'size-'+sizeTable.size;
|
|
var field = 'size-'+sizeTable.size;
|
|
tableRow.sizeTables[j].proportion = tableRow[field];
|
|
tableRow.sizeTables[j].proportion = tableRow[field];
|
|
- }
|
|
|
|
- tableRow.sort = ++sort;
|
|
|
|
- }
|
|
|
|
- if(this.editDecide === 'edit'){
|
|
|
|
- editSpltList(newObj).then(res => {
|
|
|
|
- if (res.success) {
|
|
|
|
- this.$message.success('编辑成功')
|
|
|
|
- this.close()
|
|
|
|
- //清空信息
|
|
|
|
- newObj = {};
|
|
|
|
- that.fatherList() // 调用父组件 查询方法
|
|
|
|
- }else{
|
|
|
|
- this.$message.error(res.message)
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
- }else {
|
|
|
|
- addSpltList(newObj).then(res => {
|
|
|
|
- if (res.success) {
|
|
|
|
- this.$message.success('新增成功')
|
|
|
|
- this.close()
|
|
|
|
- //清空信息
|
|
|
|
- newObj = {};
|
|
|
|
- that.fatherList() // 调用父组件 查询方法
|
|
|
|
- }else{
|
|
|
|
- this.$message.error(res.message)
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
- }
|
|
|
|
|
|
+ }
|
|
|
|
+ tableRow.sort = ++sort;
|
|
|
|
+ }
|
|
|
|
+ if(this.editDecide === 'edit'){
|
|
|
|
+ editSpltList(newObj).then(res => {
|
|
|
|
+ if (res.success) {
|
|
|
|
+ this.$message.success('编辑成功')
|
|
|
|
+ this.close()
|
|
|
|
+ //清空信息
|
|
|
|
+ newObj = {};
|
|
|
|
+ that.fatherList() // 调用父组件 查询方法
|
|
|
|
+ }else{
|
|
|
|
+ this.$message.error(res.message)
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ }else {
|
|
|
|
+ addSpltList(newObj).then(res => {
|
|
|
|
+ if (res.success) {
|
|
|
|
+ this.$message.success('新增成功')
|
|
|
|
+ this.close()
|
|
|
|
+ //清空信息
|
|
|
|
+ newObj = {};
|
|
|
|
+ that.fatherList() // 调用父组件 查询方法
|
|
|
|
+ }else{
|
|
|
|
+ this.$message.error(res.message)
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ }
|
|
}
|
|
}
|
|
})
|
|
})
|
|
},
|
|
},
|