给单据增加复制功能

This commit is contained in:
季圣华
2021-09-22 23:08:24 +08:00
parent efb1e828e0
commit a7ac4581fd
28 changed files with 120 additions and 0 deletions

View File

@@ -97,6 +97,8 @@
<a-divider v-if="btnEnableList.indexOf(1)>-1" type="vertical" />
<a v-if="btnEnableList.indexOf(1)>-1" @click="myHandleEdit(record)">编辑</a>
<a-divider v-if="btnEnableList.indexOf(1)>-1" type="vertical" />
<a v-if="btnEnableList.indexOf(1)>-1" @click="myHandleCopyAdd(record)">复制</a>
<a-divider v-if="btnEnableList.indexOf(1)>-1" type="vertical" />
<a-popconfirm v-if="btnEnableList.indexOf(1)>-1" title="确定删除吗?" @confirm="() => myHandleDelete(record)">
<a>删除</a>
</a-popconfirm>

View File

@@ -97,6 +97,8 @@
<a-divider v-if="btnEnableList.indexOf(1)>-1" type="vertical" />
<a v-if="btnEnableList.indexOf(1)>-1" @click="myHandleEdit(record)">编辑</a>
<a-divider v-if="btnEnableList.indexOf(1)>-1" type="vertical" />
<a v-if="btnEnableList.indexOf(1)>-1" @click="myHandleCopyAdd(record)">复制</a>
<a-divider v-if="btnEnableList.indexOf(1)>-1" type="vertical" />
<a-popconfirm v-if="btnEnableList.indexOf(1)>-1" title="确定删除吗?" @confirm="() => myHandleDelete(record)">
<a>删除</a>
</a-popconfirm>

View File

@@ -97,6 +97,8 @@
<a-divider v-if="btnEnableList.indexOf(1)>-1" type="vertical" />
<a v-if="btnEnableList.indexOf(1)>-1" @click="myHandleEdit(record)">编辑</a>
<a-divider v-if="btnEnableList.indexOf(1)>-1" type="vertical" />
<a v-if="btnEnableList.indexOf(1)>-1" @click="myHandleCopyAdd(record)">复制</a>
<a-divider v-if="btnEnableList.indexOf(1)>-1" type="vertical" />
<a-popconfirm v-if="btnEnableList.indexOf(1)>-1" title="确定删除吗?" @confirm="() => myHandleDelete(record)">
<a>删除</a>
</a-popconfirm>

View File

@@ -106,6 +106,8 @@
<a-divider v-if="btnEnableList.indexOf(1)>-1" type="vertical" />
<a v-if="btnEnableList.indexOf(1)>-1" @click="myHandleEdit(record)">编辑</a>
<a-divider v-if="btnEnableList.indexOf(1)>-1" type="vertical" />
<a v-if="btnEnableList.indexOf(1)>-1" @click="myHandleCopyAdd(record)">复制</a>
<a-divider v-if="btnEnableList.indexOf(1)>-1" type="vertical" />
<a-popconfirm v-if="btnEnableList.indexOf(1)>-1" title="确定删除吗?" @confirm="() => myHandleDelete(record)">
<a>删除</a>
</a-popconfirm>

View File

@@ -106,6 +106,8 @@
<a-divider v-if="btnEnableList.indexOf(1)>-1" type="vertical" />
<a v-if="btnEnableList.indexOf(1)>-1" @click="myHandleEdit(record)">编辑</a>
<a-divider v-if="btnEnableList.indexOf(1)>-1" type="vertical" />
<a v-if="btnEnableList.indexOf(1)>-1" @click="myHandleCopyAdd(record)">复制</a>
<a-divider v-if="btnEnableList.indexOf(1)>-1" type="vertical" />
<a-popconfirm v-if="btnEnableList.indexOf(1)>-1" title="确定删除吗?" @confirm="() => myHandleDelete(record)">
<a>删除</a>
</a-popconfirm>

View File

@@ -106,6 +106,8 @@
<a-divider v-if="btnEnableList.indexOf(1)>-1" type="vertical" />
<a v-if="btnEnableList.indexOf(1)>-1" @click="myHandleEdit(record)">编辑</a>
<a-divider v-if="btnEnableList.indexOf(1)>-1" type="vertical" />
<a v-if="btnEnableList.indexOf(1)>-1" @click="myHandleCopyAdd(record)">复制</a>
<a-divider v-if="btnEnableList.indexOf(1)>-1" type="vertical" />
<a-popconfirm v-if="btnEnableList.indexOf(1)>-1" title="确定删除吗?" @confirm="() => myHandleDelete(record)">
<a>删除</a>
</a-popconfirm>

View File

@@ -108,6 +108,8 @@
<a-divider v-if="btnEnableList.indexOf(1)>-1" type="vertical" />
<a v-if="btnEnableList.indexOf(1)>-1" @click="myHandleEdit(record)">编辑</a>
<a-divider v-if="btnEnableList.indexOf(1)>-1" type="vertical" />
<a v-if="btnEnableList.indexOf(1)>-1" @click="myHandleCopyAdd(record)">复制</a>
<a-divider v-if="btnEnableList.indexOf(1)>-1" type="vertical" />
<a-popconfirm v-if="btnEnableList.indexOf(1)>-1" title="确定删除吗?" @confirm="() => myHandleDelete(record)">
<a>删除</a>
</a-popconfirm>

View File

@@ -107,6 +107,8 @@
<a-divider v-if="btnEnableList.indexOf(1)>-1" type="vertical" />
<a v-if="btnEnableList.indexOf(1)>-1" @click="myHandleEdit(record)">编辑</a>
<a-divider v-if="btnEnableList.indexOf(1)>-1" type="vertical" />
<a v-if="btnEnableList.indexOf(1)>-1" @click="myHandleCopyAdd(record)">复制</a>
<a-divider v-if="btnEnableList.indexOf(1)>-1" type="vertical" />
<a-popconfirm v-if="btnEnableList.indexOf(1)>-1" title="确定删除吗?" @confirm="() => myHandleDelete(record)">
<a>删除</a>
</a-popconfirm>

View File

@@ -106,6 +106,8 @@
<a-divider v-if="btnEnableList.indexOf(1)>-1" type="vertical" />
<a v-if="btnEnableList.indexOf(1)>-1" @click="myHandleEdit(record)">编辑</a>
<a-divider v-if="btnEnableList.indexOf(1)>-1" type="vertical" />
<a v-if="btnEnableList.indexOf(1)>-1" @click="myHandleCopyAdd(record)">复制</a>
<a-divider v-if="btnEnableList.indexOf(1)>-1" type="vertical" />
<a-popconfirm v-if="btnEnableList.indexOf(1)>-1" title="确定删除吗?" @confirm="() => myHandleDelete(record)">
<a>删除</a>
</a-popconfirm>

View File

@@ -106,6 +106,8 @@
<a-divider v-if="btnEnableList.indexOf(1)>-1" type="vertical" />
<a v-if="btnEnableList.indexOf(1)>-1" @click="myHandleEdit(record)">编辑</a>
<a-divider v-if="btnEnableList.indexOf(1)>-1" type="vertical" />
<a v-if="btnEnableList.indexOf(1)>-1" @click="myHandleCopyAdd(record)">复制</a>
<a-divider v-if="btnEnableList.indexOf(1)>-1" type="vertical" />
<a-popconfirm v-if="btnEnableList.indexOf(1)>-1" title="确定删除吗?" @confirm="() => myHandleDelete(record)">
<a>删除</a>
</a-popconfirm>

View File

@@ -107,6 +107,8 @@
<a-divider v-if="btnEnableList.indexOf(1)>-1" type="vertical" />
<a v-if="btnEnableList.indexOf(1)>-1" @click="myHandleEdit(record)">编辑</a>
<a-divider v-if="btnEnableList.indexOf(1)>-1" type="vertical" />
<a v-if="btnEnableList.indexOf(1)>-1" @click="myHandleCopyAdd(record)">复制</a>
<a-divider v-if="btnEnableList.indexOf(1)>-1" type="vertical" />
<a-popconfirm v-if="btnEnableList.indexOf(1)>-1" title="确定删除吗?" @confirm="() => myHandleDelete(record)">
<a>删除</a>
</a-popconfirm>

View File

@@ -108,6 +108,8 @@
<a-divider v-if="btnEnableList.indexOf(1)>-1" type="vertical" />
<a v-if="btnEnableList.indexOf(1)>-1" @click="myHandleEdit(record)">编辑</a>
<a-divider v-if="btnEnableList.indexOf(1)>-1" type="vertical" />
<a v-if="btnEnableList.indexOf(1)>-1" @click="myHandleCopyAdd(record)">复制</a>
<a-divider v-if="btnEnableList.indexOf(1)>-1" type="vertical" />
<a-popconfirm v-if="btnEnableList.indexOf(1)>-1" title="确定删除吗?" @confirm="() => myHandleDelete(record)">
<a>删除</a>
</a-popconfirm>

View File

@@ -109,6 +109,8 @@
<a-divider v-if="btnEnableList.indexOf(1)>-1" type="vertical" />
<a v-if="btnEnableList.indexOf(1)>-1" @click="myHandleEdit(record)">编辑</a>
<a-divider v-if="btnEnableList.indexOf(1)>-1" type="vertical" />
<a v-if="btnEnableList.indexOf(1)>-1" @click="myHandleCopyAdd(record)">复制</a>
<a-divider v-if="btnEnableList.indexOf(1)>-1" type="vertical" />
<a-popconfirm v-if="btnEnableList.indexOf(1)>-1" title="确定删除吗?" @confirm="() => myHandleDelete(record)">
<a>删除</a>
</a-popconfirm>

View File

@@ -33,6 +33,12 @@ export const BillListMixin = {
this.$refs.modalForm.action = "add";
this.handleAdd();
},
myHandleCopyAdd(record) {
this.$refs.modalForm.action = "copyAdd";
this.$refs.modalForm.edit(record);
this.$refs.modalForm.title = "复制新增";
this.$refs.modalForm.disableSubmit = false;
},
myHandleEdit(record) {
if(record.status === '0') {
this.$refs.modalForm.action = "edit";

View File

@@ -69,6 +69,16 @@ export const BillModalMixin = {
this.accountMoneyList = []
this.manyAccountBtnStatus = false
},
copyAddInit(amountNum) {
getAction('/sequence/buildNumber').then((res) => {
if (res && res.code === 200) {
this.form.setFieldsValue({'number':amountNum + res.data.defaultNumber})
}
})
this.$nextTick(() => {
this.form.setFieldsValue({'operTime':getNowFormatDateTime()})
})
},
initSupplier() {
let that = this;
findBySelectSup({}).then((res)=>{

View File

@@ -165,6 +165,12 @@
let url = this.readOnly ? this.url.detailList : this.url.detailList;
this.requestSubTableData(url, params, this.materialTable);
}
//复制新增单据-初始化单号和日期
if(this.action === 'copyAdd') {
this.model.id = ''
this.model.tenantId = ''
this.copyAddInit(this.prefixNo)
}
this.initDepot()
},
//提交单据时整理成formData

View File

@@ -167,6 +167,12 @@
let url = this.readOnly ? this.url.detailList : this.url.detailList;
this.requestSubTableData(url, params, this.materialTable);
}
//复制新增单据-初始化单号和日期
if(this.action === 'copyAdd') {
this.model.id = ''
this.model.tenantId = ''
this.copyAddInit(this.prefixNo)
}
this.initDepot()
},
//提交单据时整理成formData

View File

@@ -166,6 +166,12 @@
let url = this.readOnly ? this.url.detailList : this.url.detailList;
this.requestSubTableData(url, params, this.materialTable);
}
//复制新增单据-初始化单号和日期
if(this.action === 'copyAdd') {
this.model.id = ''
this.model.tenantId = ''
this.copyAddInit(this.prefixNo)
}
this.initDepot()
},
//提交单据时整理成formData

View File

@@ -173,6 +173,12 @@
let url = this.readOnly ? this.url.detailList : this.url.detailList;
this.requestSubTableData(url, params, this.materialTable);
}
//复制新增单据-初始化单号和日期
if(this.action === 'copyAdd') {
this.model.id = ''
this.model.tenantId = ''
this.copyAddInit(this.prefixNo)
}
this.initSupplier()
this.initDepot()
},

View File

@@ -173,6 +173,12 @@
let url = this.readOnly ? this.url.detailList : this.url.detailList;
this.requestSubTableData(url, params, this.materialTable);
}
//复制新增单据-初始化单号和日期
if(this.action === 'copyAdd') {
this.model.id = ''
this.model.tenantId = ''
this.copyAddInit(this.prefixNo)
}
this.initCustomer()
this.initDepot()
},

View File

@@ -253,6 +253,12 @@
let url = this.readOnly ? this.url.detailList : this.url.detailList;
this.requestSubTableData(url, params, this.materialTable);
}
//复制新增单据-初始化单号和日期
if(this.action === 'copyAdd') {
this.model.id = ''
this.model.tenantId = ''
this.copyAddInit(this.prefixNo)
}
this.initSupplier()
this.initDepot()
this.initAccount()

View File

@@ -254,6 +254,12 @@
let url = this.readOnly ? this.url.detailList : this.url.detailList;
this.requestSubTableData(url, params, this.materialTable);
}
//复制新增单据-初始化单号和日期
if(this.action === 'copyAdd') {
this.model.id = ''
this.model.tenantId = ''
this.copyAddInit(this.prefixNo)
}
this.initSupplier()
this.initDepot()
this.initAccount()

View File

@@ -175,6 +175,12 @@
let url = this.readOnly ? this.url.detailList : this.url.detailList;
this.requestSubTableData(url, params, this.materialTable);
}
//复制新增单据-初始化单号和日期
if(this.action === 'copyAdd') {
this.model.id = ''
this.model.tenantId = ''
this.copyAddInit(this.prefixNo)
}
this.initSupplier()
this.initDepot()
},

View File

@@ -220,6 +220,12 @@
let url = this.readOnly ? this.url.detailList : this.url.detailList;
this.requestSubTableData(url, params, this.materialTable);
}
//复制新增单据-初始化单号和日期
if(this.action === 'copyAdd') {
this.model.id = ''
this.model.tenantId = ''
this.copyAddInit(this.prefixNo)
}
this.initRetail()
this.initDepot()
this.initAccount()

View File

@@ -228,6 +228,12 @@
let url = this.readOnly ? this.url.detailList : this.url.detailList;
this.requestSubTableData(url, params, this.materialTable);
}
//复制新增单据-初始化单号和日期
if(this.action === 'copyAdd') {
this.model.id = ''
this.model.tenantId = ''
this.copyAddInit(this.prefixNo)
}
this.initRetail()
this.initDepot()
this.initAccount()

View File

@@ -260,6 +260,12 @@
let url = this.readOnly ? this.url.detailList : this.url.detailList;
this.requestSubTableData(url, params, this.materialTable);
}
//复制新增单据-初始化单号和日期
if(this.action === 'copyAdd') {
this.model.id = ''
this.model.tenantId = ''
this.copyAddInit(this.prefixNo)
}
this.initCustomer()
this.initSalesman()
this.initDepot()

View File

@@ -181,6 +181,12 @@
let url = this.readOnly ? this.url.detailList : this.url.detailList;
this.requestSubTableData(url, params, this.materialTable);
}
//复制新增单据-初始化单号和日期
if(this.action === 'copyAdd') {
this.model.id = ''
this.model.tenantId = ''
this.copyAddInit(this.prefixNo)
}
this.initCustomer()
this.initSalesman()
this.initDepot()

View File

@@ -260,6 +260,12 @@
let url = this.readOnly ? this.url.detailList : this.url.detailList;
this.requestSubTableData(url, params, this.materialTable);
}
//复制新增单据-初始化单号和日期
if(this.action === 'copyAdd') {
this.model.id = ''
this.model.tenantId = ''
this.copyAddInit(this.prefixNo)
}
this.initCustomer()
this.initSalesman()
this.initDepot()