给单据增加复制功能
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -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)=>{
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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()
|
||||
},
|
||||
|
||||
@@ -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()
|
||||
},
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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()
|
||||
},
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user