优化单据中仓库、账户之类的下拉框
This commit is contained in:
@@ -37,12 +37,6 @@ export const BillModalMixin = {
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
created () {
|
created () {
|
||||||
this.initSupplier()
|
|
||||||
this.initCustomer()
|
|
||||||
this.initRetail()
|
|
||||||
this.initSalesman()
|
|
||||||
this.initDepot()
|
|
||||||
this.initAccount()
|
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
readOnly: function() {
|
readOnly: function() {
|
||||||
@@ -112,13 +106,14 @@ export const BillModalMixin = {
|
|||||||
getAction('/depot/findDepotByCurrentUser').then((res) => {
|
getAction('/depot/findDepotByCurrentUser').then((res) => {
|
||||||
if(res.code === 200){
|
if(res.code === 200){
|
||||||
let arr = res.data
|
let arr = res.data
|
||||||
for(let i=0; i<arr.length; i++) {
|
for(let item of that.materialTable.columns){
|
||||||
let depotInfo = {};
|
if(item.key == 'depotId' || item.key == 'anotherDepotId') {
|
||||||
depotInfo.value = arr[i].id+'' //注意-此处value必须为字符串格式
|
item.options = []
|
||||||
depotInfo.text = arr[i].depotName
|
for(let i=0; i<arr.length; i++) {
|
||||||
depotInfo.title = arr[i].depotName
|
let depotInfo = {};
|
||||||
for(let item of that.materialTable.columns){
|
depotInfo.value = arr[i].id + '' //注意-此处value必须为字符串格式
|
||||||
if(item.key == 'depotId' || item.key == 'anotherDepotId') {
|
depotInfo.text = arr[i].depotName
|
||||||
|
depotInfo.title = arr[i].depotName
|
||||||
item.options.push(depotInfo)
|
item.options.push(depotInfo)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -101,7 +101,7 @@
|
|||||||
dataSource: [],
|
dataSource: [],
|
||||||
columns: [
|
columns: [
|
||||||
{ title: '仓库名称', key: 'depotId', width: '8%', type: FormTypes.select, placeholder: '请选择${title}', options: [],
|
{ title: '仓库名称', key: 'depotId', width: '8%', type: FormTypes.select, placeholder: '请选择${title}', options: [],
|
||||||
validateRules: [{ required: true, message: '${title}不能为空' }]
|
allowSearch:true, validateRules: [{ required: true, message: '${title}不能为空' }]
|
||||||
},
|
},
|
||||||
{ title: '条码', key: 'barCode', width: '10%', type: FormTypes.popupJsh, multi: false,
|
{ title: '条码', key: 'barCode', width: '10%', type: FormTypes.popupJsh, multi: false,
|
||||||
validateRules: [{ required: true, message: '${title}不能为空' }]
|
validateRules: [{ required: true, message: '${title}不能为空' }]
|
||||||
@@ -111,7 +111,7 @@
|
|||||||
{ title: '型号', key: 'model', width: '5%', type: FormTypes.input, readonly: true },
|
{ title: '型号', key: 'model', width: '5%', type: FormTypes.input, readonly: true },
|
||||||
{ title: '扩展信息', key: 'materialOther', width: '6%', type: FormTypes.input, readonly: true },
|
{ title: '扩展信息', key: 'materialOther', width: '6%', type: FormTypes.input, readonly: true },
|
||||||
{ title: '库存', key: 'stock', width: '5%', type: FormTypes.input, readonly: true },
|
{ title: '库存', key: 'stock', width: '5%', type: FormTypes.input, readonly: true },
|
||||||
{ title: '调入仓库', key: 'anotherDepotId', width: '8%', type: FormTypes.select, placeholder: '请选择${title}', options: []},
|
{ title: '调入仓库', key: 'anotherDepotId', width: '8%', type: FormTypes.select, placeholder: '请选择${title}', options: [], allowSearch:true},
|
||||||
{ title: '单位', key: 'unit', width: '4%', type: FormTypes.input, readonly: true },
|
{ title: '单位', key: 'unit', width: '4%', type: FormTypes.input, readonly: true },
|
||||||
{ title: '数量', key: 'operNumber', width: '5%', type: FormTypes.inputNumber, statistics: true,
|
{ title: '数量', key: 'operNumber', width: '5%', type: FormTypes.inputNumber, statistics: true,
|
||||||
validateRules: [{ required: true, message: '${title}不能为空' }]
|
validateRules: [{ required: true, message: '${title}不能为空' }]
|
||||||
@@ -164,6 +164,7 @@
|
|||||||
let url = this.readOnly ? this.url.detailList : this.url.detailList;
|
let url = this.readOnly ? this.url.detailList : this.url.detailList;
|
||||||
this.requestSubTableData(url, params, this.materialTable);
|
this.requestSubTableData(url, params, this.materialTable);
|
||||||
}
|
}
|
||||||
|
this.initDepot()
|
||||||
},
|
},
|
||||||
//提交单据时整理成formData
|
//提交单据时整理成formData
|
||||||
classifyIntoFormData(allValues) {
|
classifyIntoFormData(allValues) {
|
||||||
|
|||||||
@@ -103,7 +103,7 @@
|
|||||||
columns: [
|
columns: [
|
||||||
{ title: '商品类型',key: 'mType',width:'7%', type: FormTypes.input, readonly: true },
|
{ title: '商品类型',key: 'mType',width:'7%', type: FormTypes.input, readonly: true },
|
||||||
{ title: '仓库名称', key: 'depotId', width: '8%', type: FormTypes.select, placeholder: '请选择${title}', options: [],
|
{ title: '仓库名称', key: 'depotId', width: '8%', type: FormTypes.select, placeholder: '请选择${title}', options: [],
|
||||||
validateRules: [{ required: true, message: '${title}不能为空' }]
|
allowSearch:true, validateRules: [{ required: true, message: '${title}不能为空' }]
|
||||||
},
|
},
|
||||||
{ title: '条码', key: 'barCode', width: '10%', type: FormTypes.popupJsh, multi: false,
|
{ title: '条码', key: 'barCode', width: '10%', type: FormTypes.popupJsh, multi: false,
|
||||||
validateRules: [{ required: true, message: '${title}不能为空' }]
|
validateRules: [{ required: true, message: '${title}不能为空' }]
|
||||||
@@ -166,6 +166,7 @@
|
|||||||
let url = this.readOnly ? this.url.detailList : this.url.detailList;
|
let url = this.readOnly ? this.url.detailList : this.url.detailList;
|
||||||
this.requestSubTableData(url, params, this.materialTable);
|
this.requestSubTableData(url, params, this.materialTable);
|
||||||
}
|
}
|
||||||
|
this.initDepot()
|
||||||
},
|
},
|
||||||
//提交单据时整理成formData
|
//提交单据时整理成formData
|
||||||
classifyIntoFormData(allValues) {
|
classifyIntoFormData(allValues) {
|
||||||
|
|||||||
@@ -103,7 +103,7 @@
|
|||||||
columns: [
|
columns: [
|
||||||
{ title: '商品类型',key: 'mType',width:'7%', type: FormTypes.input, readonly: true },
|
{ title: '商品类型',key: 'mType',width:'7%', type: FormTypes.input, readonly: true },
|
||||||
{ title: '仓库名称', key: 'depotId', width: '8%', type: FormTypes.select, placeholder: '请选择${title}', options: [],
|
{ title: '仓库名称', key: 'depotId', width: '8%', type: FormTypes.select, placeholder: '请选择${title}', options: [],
|
||||||
validateRules: [{ required: true, message: '${title}不能为空' }]
|
allowSearch:true, validateRules: [{ required: true, message: '${title}不能为空' }]
|
||||||
},
|
},
|
||||||
{ title: '条码', key: 'barCode', width: '10%', type: FormTypes.popupJsh, multi: false,
|
{ title: '条码', key: 'barCode', width: '10%', type: FormTypes.popupJsh, multi: false,
|
||||||
validateRules: [{ required: true, message: '${title}不能为空' }]
|
validateRules: [{ required: true, message: '${title}不能为空' }]
|
||||||
@@ -165,6 +165,7 @@
|
|||||||
let url = this.readOnly ? this.url.detailList : this.url.detailList;
|
let url = this.readOnly ? this.url.detailList : this.url.detailList;
|
||||||
this.requestSubTableData(url, params, this.materialTable);
|
this.requestSubTableData(url, params, this.materialTable);
|
||||||
}
|
}
|
||||||
|
this.initDepot()
|
||||||
},
|
},
|
||||||
//提交单据时整理成formData
|
//提交单据时整理成formData
|
||||||
classifyIntoFormData(allValues) {
|
classifyIntoFormData(allValues) {
|
||||||
|
|||||||
@@ -110,7 +110,7 @@
|
|||||||
dataSource: [],
|
dataSource: [],
|
||||||
columns: [
|
columns: [
|
||||||
{ title: '仓库名称', key: 'depotId', width: '8%', type: FormTypes.select, placeholder: '请选择${title}', options: [],
|
{ title: '仓库名称', key: 'depotId', width: '8%', type: FormTypes.select, placeholder: '请选择${title}', options: [],
|
||||||
validateRules: [{ required: true, message: '${title}不能为空' }]
|
allowSearch:true, validateRules: [{ required: true, message: '${title}不能为空' }]
|
||||||
},
|
},
|
||||||
{ title: '条码', key: 'barCode', width: '10%', type: FormTypes.popupJsh, multi: false,
|
{ title: '条码', key: 'barCode', width: '10%', type: FormTypes.popupJsh, multi: false,
|
||||||
validateRules: [{ required: true, message: '${title}不能为空' }]
|
validateRules: [{ required: true, message: '${title}不能为空' }]
|
||||||
@@ -172,6 +172,8 @@
|
|||||||
let url = this.readOnly ? this.url.detailList : this.url.detailList;
|
let url = this.readOnly ? this.url.detailList : this.url.detailList;
|
||||||
this.requestSubTableData(url, params, this.materialTable);
|
this.requestSubTableData(url, params, this.materialTable);
|
||||||
}
|
}
|
||||||
|
this.initSupplier()
|
||||||
|
this.initDepot()
|
||||||
},
|
},
|
||||||
//提交单据时整理成formData
|
//提交单据时整理成formData
|
||||||
classifyIntoFormData(allValues) {
|
classifyIntoFormData(allValues) {
|
||||||
|
|||||||
@@ -110,7 +110,7 @@
|
|||||||
dataSource: [],
|
dataSource: [],
|
||||||
columns: [
|
columns: [
|
||||||
{ title: '仓库名称', key: 'depotId', width: '8%', type: FormTypes.select, placeholder: '请选择${title}', options: [],
|
{ title: '仓库名称', key: 'depotId', width: '8%', type: FormTypes.select, placeholder: '请选择${title}', options: [],
|
||||||
validateRules: [{ required: true, message: '${title}不能为空' }]
|
allowSearch:true, validateRules: [{ required: true, message: '${title}不能为空' }]
|
||||||
},
|
},
|
||||||
{ title: '条码', key: 'barCode', width: '10%', type: FormTypes.popupJsh, multi: false,
|
{ title: '条码', key: 'barCode', width: '10%', type: FormTypes.popupJsh, multi: false,
|
||||||
validateRules: [{ required: true, message: '${title}不能为空' }]
|
validateRules: [{ required: true, message: '${title}不能为空' }]
|
||||||
@@ -172,6 +172,8 @@
|
|||||||
let url = this.readOnly ? this.url.detailList : this.url.detailList;
|
let url = this.readOnly ? this.url.detailList : this.url.detailList;
|
||||||
this.requestSubTableData(url, params, this.materialTable);
|
this.requestSubTableData(url, params, this.materialTable);
|
||||||
}
|
}
|
||||||
|
this.initCustomer()
|
||||||
|
this.initDepot()
|
||||||
},
|
},
|
||||||
//提交单据时整理成formData
|
//提交单据时整理成formData
|
||||||
classifyIntoFormData(allValues) {
|
classifyIntoFormData(allValues) {
|
||||||
|
|||||||
@@ -172,7 +172,7 @@
|
|||||||
dataSource: [],
|
dataSource: [],
|
||||||
columns: [
|
columns: [
|
||||||
{ title: '仓库名称', key: 'depotId', width: '8%', type: FormTypes.select, placeholder: '请选择${title}', options: [],
|
{ title: '仓库名称', key: 'depotId', width: '8%', type: FormTypes.select, placeholder: '请选择${title}', options: [],
|
||||||
validateRules: [{ required: true, message: '${title}不能为空' }]
|
allowSearch:true, validateRules: [{ required: true, message: '${title}不能为空' }]
|
||||||
},
|
},
|
||||||
{ title: '条码', key: 'barCode', width: '10%', type: FormTypes.popupJsh, multi: false,
|
{ title: '条码', key: 'barCode', width: '10%', type: FormTypes.popupJsh, multi: false,
|
||||||
validateRules: [{ required: true, message: '${title}不能为空' }]
|
validateRules: [{ required: true, message: '${title}不能为空' }]
|
||||||
@@ -252,6 +252,9 @@
|
|||||||
let url = this.readOnly ? this.url.detailList : this.url.detailList;
|
let url = this.readOnly ? this.url.detailList : this.url.detailList;
|
||||||
this.requestSubTableData(url, params, this.materialTable);
|
this.requestSubTableData(url, params, this.materialTable);
|
||||||
}
|
}
|
||||||
|
this.initSupplier()
|
||||||
|
this.initDepot()
|
||||||
|
this.initAccount()
|
||||||
},
|
},
|
||||||
//提交单据时整理成formData
|
//提交单据时整理成formData
|
||||||
classifyIntoFormData(allValues) {
|
classifyIntoFormData(allValues) {
|
||||||
|
|||||||
@@ -173,7 +173,7 @@
|
|||||||
dataSource: [],
|
dataSource: [],
|
||||||
columns: [
|
columns: [
|
||||||
{ title: '仓库名称', key: 'depotId', width: '8%', type: FormTypes.select, placeholder: '请选择${title}', options: [],
|
{ title: '仓库名称', key: 'depotId', width: '8%', type: FormTypes.select, placeholder: '请选择${title}', options: [],
|
||||||
validateRules: [{ required: true, message: '${title}不能为空' }]
|
allowSearch:true, validateRules: [{ required: true, message: '${title}不能为空' }]
|
||||||
},
|
},
|
||||||
{ title: '条码', key: 'barCode', width: '10%', type: FormTypes.popupJsh, multi: false,
|
{ title: '条码', key: 'barCode', width: '10%', type: FormTypes.popupJsh, multi: false,
|
||||||
validateRules: [{ required: true, message: '${title}不能为空' }]
|
validateRules: [{ required: true, message: '${title}不能为空' }]
|
||||||
@@ -253,6 +253,9 @@
|
|||||||
let url = this.readOnly ? this.url.detailList : this.url.detailList;
|
let url = this.readOnly ? this.url.detailList : this.url.detailList;
|
||||||
this.requestSubTableData(url, params, this.materialTable);
|
this.requestSubTableData(url, params, this.materialTable);
|
||||||
}
|
}
|
||||||
|
this.initSupplier()
|
||||||
|
this.initDepot()
|
||||||
|
this.initAccount()
|
||||||
},
|
},
|
||||||
//提交单据时整理成formData
|
//提交单据时整理成formData
|
||||||
classifyIntoFormData(allValues) {
|
classifyIntoFormData(allValues) {
|
||||||
|
|||||||
@@ -113,7 +113,7 @@
|
|||||||
dataSource: [],
|
dataSource: [],
|
||||||
columns: [
|
columns: [
|
||||||
{ title: '仓库名称', key: 'depotId', width: '8%', type: FormTypes.select, placeholder: '请选择${title}', options: [],
|
{ title: '仓库名称', key: 'depotId', width: '8%', type: FormTypes.select, placeholder: '请选择${title}', options: [],
|
||||||
validateRules: [{ required: true, message: '${title}不能为空' }]
|
allowSearch:true, validateRules: [{ required: true, message: '${title}不能为空' }]
|
||||||
},
|
},
|
||||||
{ title: '条码', key: 'barCode', width: '12%', type: FormTypes.popupJsh, multi: false,
|
{ title: '条码', key: 'barCode', width: '12%', type: FormTypes.popupJsh, multi: false,
|
||||||
validateRules: [{ required: true, message: '${title}不能为空' }]
|
validateRules: [{ required: true, message: '${title}不能为空' }]
|
||||||
@@ -174,6 +174,8 @@
|
|||||||
let url = this.readOnly ? this.url.detailList : this.url.detailList;
|
let url = this.readOnly ? this.url.detailList : this.url.detailList;
|
||||||
this.requestSubTableData(url, params, this.materialTable);
|
this.requestSubTableData(url, params, this.materialTable);
|
||||||
}
|
}
|
||||||
|
this.initSupplier()
|
||||||
|
this.initDepot()
|
||||||
},
|
},
|
||||||
/** 整理成formData */
|
/** 整理成formData */
|
||||||
classifyIntoFormData(allValues) {
|
classifyIntoFormData(allValues) {
|
||||||
|
|||||||
@@ -154,7 +154,7 @@
|
|||||||
dataSource: [],
|
dataSource: [],
|
||||||
columns: [
|
columns: [
|
||||||
{ title: '仓库名称', key: 'depotId', width: '8%', type: FormTypes.select, placeholder: '请选择${title}', options: [],
|
{ title: '仓库名称', key: 'depotId', width: '8%', type: FormTypes.select, placeholder: '请选择${title}', options: [],
|
||||||
validateRules: [{ required: true, message: '${title}不能为空' }]
|
allowSearch:true, validateRules: [{ required: true, message: '${title}不能为空' }]
|
||||||
},
|
},
|
||||||
{ title: '条码', key: 'barCode', width: '10%', type: FormTypes.popupJsh, multi: false,
|
{ title: '条码', key: 'barCode', width: '10%', type: FormTypes.popupJsh, multi: false,
|
||||||
validateRules: [{ required: true, message: '${title}不能为空' }]
|
validateRules: [{ required: true, message: '${title}不能为空' }]
|
||||||
@@ -218,6 +218,9 @@
|
|||||||
let url = this.readOnly ? this.url.detailList : this.url.detailList;
|
let url = this.readOnly ? this.url.detailList : this.url.detailList;
|
||||||
this.requestSubTableData(url, params, this.materialTable);
|
this.requestSubTableData(url, params, this.materialTable);
|
||||||
}
|
}
|
||||||
|
this.initRetail()
|
||||||
|
this.initDepot()
|
||||||
|
this.initAccount()
|
||||||
},
|
},
|
||||||
//提交单据时整理成formData
|
//提交单据时整理成formData
|
||||||
classifyIntoFormData(allValues) {
|
classifyIntoFormData(allValues) {
|
||||||
|
|||||||
@@ -154,7 +154,7 @@
|
|||||||
dataSource: [],
|
dataSource: [],
|
||||||
columns: [
|
columns: [
|
||||||
{ title: '仓库名称', key: 'depotId', width: '8%', type: FormTypes.select, placeholder: '请选择${title}', options: [],
|
{ title: '仓库名称', key: 'depotId', width: '8%', type: FormTypes.select, placeholder: '请选择${title}', options: [],
|
||||||
validateRules: [{ required: true, message: '${title}不能为空' }]
|
allowSearch:true, validateRules: [{ required: true, message: '${title}不能为空' }]
|
||||||
},
|
},
|
||||||
{ title: '条码', key: 'barCode', width: '10%', type: FormTypes.popupJsh, multi: false,
|
{ title: '条码', key: 'barCode', width: '10%', type: FormTypes.popupJsh, multi: false,
|
||||||
validateRules: [{ required: true, message: '${title}不能为空' }]
|
validateRules: [{ required: true, message: '${title}不能为空' }]
|
||||||
@@ -226,6 +226,9 @@
|
|||||||
let url = this.readOnly ? this.url.detailList : this.url.detailList;
|
let url = this.readOnly ? this.url.detailList : this.url.detailList;
|
||||||
this.requestSubTableData(url, params, this.materialTable);
|
this.requestSubTableData(url, params, this.materialTable);
|
||||||
}
|
}
|
||||||
|
this.initRetail()
|
||||||
|
this.initDepot()
|
||||||
|
this.initAccount()
|
||||||
},
|
},
|
||||||
//提交单据时整理成formData
|
//提交单据时整理成formData
|
||||||
classifyIntoFormData(allValues) {
|
classifyIntoFormData(allValues) {
|
||||||
|
|||||||
@@ -177,7 +177,7 @@
|
|||||||
dataSource: [],
|
dataSource: [],
|
||||||
columns: [
|
columns: [
|
||||||
{ title: '仓库名称', key: 'depotId', width: '8%', type: FormTypes.select, placeholder: '请选择${title}', options: [],
|
{ title: '仓库名称', key: 'depotId', width: '8%', type: FormTypes.select, placeholder: '请选择${title}', options: [],
|
||||||
validateRules: [{ required: true, message: '${title}不能为空' }]
|
allowSearch:true, validateRules: [{ required: true, message: '${title}不能为空' }]
|
||||||
},
|
},
|
||||||
{ title: '条码', key: 'barCode', width: '10%', type: FormTypes.popupJsh, multi: false,
|
{ title: '条码', key: 'barCode', width: '10%', type: FormTypes.popupJsh, multi: false,
|
||||||
validateRules: [{ required: true, message: '${title}不能为空' }]
|
validateRules: [{ required: true, message: '${title}不能为空' }]
|
||||||
@@ -259,6 +259,10 @@
|
|||||||
let url = this.readOnly ? this.url.detailList : this.url.detailList;
|
let url = this.readOnly ? this.url.detailList : this.url.detailList;
|
||||||
this.requestSubTableData(url, params, this.materialTable);
|
this.requestSubTableData(url, params, this.materialTable);
|
||||||
}
|
}
|
||||||
|
this.initCustomer()
|
||||||
|
this.initSalesman()
|
||||||
|
this.initDepot()
|
||||||
|
this.initAccount()
|
||||||
},
|
},
|
||||||
//提交单据时整理成formData
|
//提交单据时整理成formData
|
||||||
classifyIntoFormData(allValues) {
|
classifyIntoFormData(allValues) {
|
||||||
|
|||||||
@@ -116,7 +116,7 @@
|
|||||||
dataSource: [],
|
dataSource: [],
|
||||||
columns: [
|
columns: [
|
||||||
{ title: '仓库名称', key: 'depotId', width: '8%', type: FormTypes.select, placeholder: '请选择${title}', options: [],
|
{ title: '仓库名称', key: 'depotId', width: '8%', type: FormTypes.select, placeholder: '请选择${title}', options: [],
|
||||||
validateRules: [{ required: true, message: '${title}不能为空' }]
|
allowSearch:true, validateRules: [{ required: true, message: '${title}不能为空' }]
|
||||||
},
|
},
|
||||||
{ title: '条码', key: 'barCode', width: '10%', type: FormTypes.popupJsh, multi: false,
|
{ title: '条码', key: 'barCode', width: '10%', type: FormTypes.popupJsh, multi: false,
|
||||||
validateRules: [{ required: true, message: '${title}不能为空' }]
|
validateRules: [{ required: true, message: '${title}不能为空' }]
|
||||||
@@ -180,6 +180,9 @@
|
|||||||
let url = this.readOnly ? this.url.detailList : this.url.detailList;
|
let url = this.readOnly ? this.url.detailList : this.url.detailList;
|
||||||
this.requestSubTableData(url, params, this.materialTable);
|
this.requestSubTableData(url, params, this.materialTable);
|
||||||
}
|
}
|
||||||
|
this.initCustomer()
|
||||||
|
this.initSalesman()
|
||||||
|
this.initDepot()
|
||||||
},
|
},
|
||||||
//提交单据时整理成formData
|
//提交单据时整理成formData
|
||||||
classifyIntoFormData(allValues) {
|
classifyIntoFormData(allValues) {
|
||||||
|
|||||||
@@ -177,7 +177,7 @@
|
|||||||
dataSource: [],
|
dataSource: [],
|
||||||
columns: [
|
columns: [
|
||||||
{ title: '仓库名称', key: 'depotId', width: '8%', type: FormTypes.select, placeholder: '请选择${title}', options: [],
|
{ title: '仓库名称', key: 'depotId', width: '8%', type: FormTypes.select, placeholder: '请选择${title}', options: [],
|
||||||
validateRules: [{ required: true, message: '${title}不能为空' }]
|
allowSearch:true, validateRules: [{ required: true, message: '${title}不能为空' }]
|
||||||
},
|
},
|
||||||
{ title: '条码', key: 'barCode', width: '10%', type: FormTypes.popupJsh, multi: false,
|
{ title: '条码', key: 'barCode', width: '10%', type: FormTypes.popupJsh, multi: false,
|
||||||
validateRules: [{ required: true, message: '${title}不能为空' }]
|
validateRules: [{ required: true, message: '${title}不能为空' }]
|
||||||
@@ -259,6 +259,10 @@
|
|||||||
let url = this.readOnly ? this.url.detailList : this.url.detailList;
|
let url = this.readOnly ? this.url.detailList : this.url.detailList;
|
||||||
this.requestSubTableData(url, params, this.materialTable);
|
this.requestSubTableData(url, params, this.materialTable);
|
||||||
}
|
}
|
||||||
|
this.initCustomer()
|
||||||
|
this.initSalesman()
|
||||||
|
this.initDepot()
|
||||||
|
this.initAccount()
|
||||||
},
|
},
|
||||||
//提交单据时整理成formData
|
//提交单据时整理成formData
|
||||||
classifyIntoFormData(allValues) {
|
classifyIntoFormData(allValues) {
|
||||||
|
|||||||
@@ -29,10 +29,6 @@ export const FinancialModalMixin = {
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
created () {
|
created () {
|
||||||
this.initSupplier()
|
|
||||||
this.initCustomer()
|
|
||||||
this.initRetail()
|
|
||||||
this.initPerson()
|
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
readOnly: function() {
|
readOnly: function() {
|
||||||
@@ -97,13 +93,14 @@ export const FinancialModalMixin = {
|
|||||||
let that = this;
|
let that = this;
|
||||||
findInOutItemByParam({type:type}).then((res)=>{
|
findInOutItemByParam({type:type}).then((res)=>{
|
||||||
if(res) {
|
if(res) {
|
||||||
for(let i=0; i<res.length; i++) {
|
for(let item of that.accountTable.columns){
|
||||||
let inOutItemInfo = {};
|
if(item.key == 'inOutItemId') {
|
||||||
inOutItemInfo.value = res[i].id+'' //注意-此处value必须为字符串格式
|
item.options = []
|
||||||
inOutItemInfo.text = res[i].name
|
for(let i=0; i<res.length; i++) {
|
||||||
inOutItemInfo.title = res[i].name
|
let inOutItemInfo = {};
|
||||||
for(let item of that.accountTable.columns){
|
inOutItemInfo.value = res[i].id + '' //注意-此处value必须为字符串格式
|
||||||
if(item.key == 'inOutItemId') {
|
inOutItemInfo.text = res[i].name
|
||||||
|
inOutItemInfo.title = res[i].name
|
||||||
item.options.push(inOutItemInfo)
|
item.options.push(inOutItemInfo)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -126,13 +123,14 @@ export const FinancialModalMixin = {
|
|||||||
getAccount({}).then((res)=>{
|
getAccount({}).then((res)=>{
|
||||||
if(res && res.code === 200) {
|
if(res && res.code === 200) {
|
||||||
let list = res.data.accountList;
|
let list = res.data.accountList;
|
||||||
for(let i=0; i<list.length; i++) {
|
for(let item of that.accountTable.columns){
|
||||||
let accountInfo = {};
|
if(item.key == 'accountId') {
|
||||||
accountInfo.value = list[i].id+'' //注意-此处value必须为字符串格式
|
item.options = []
|
||||||
accountInfo.text = list[i].name
|
for(let i=0; i<list.length; i++) {
|
||||||
accountInfo.title = list[i].name
|
let accountInfo = {};
|
||||||
for(let item of that.accountTable.columns){
|
accountInfo.value = list[i].id + '' //注意-此处value必须为字符串格式
|
||||||
if(item.key == 'accountId') {
|
accountInfo.text = list[i].name
|
||||||
|
accountInfo.title = list[i].name
|
||||||
item.options.push(accountInfo)
|
item.options.push(accountInfo)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -129,7 +129,7 @@
|
|||||||
dataSource: [],
|
dataSource: [],
|
||||||
columns: [
|
columns: [
|
||||||
{ title: '账户名称',key: 'accountId',width: '20%', type: FormTypes.select, placeholder: '请选择${title}', options: [],
|
{ title: '账户名称',key: 'accountId',width: '20%', type: FormTypes.select, placeholder: '请选择${title}', options: [],
|
||||||
validateRules: [{ required: true, message: '${title}不能为空' }]
|
allowSearch:true, validateRules: [{ required: true, message: '${title}不能为空' }]
|
||||||
},
|
},
|
||||||
{ title: '金额',key: 'eachAmount', width: '10%', type: FormTypes.inputNumber, statistics: true, placeholder: '请选择${title}',
|
{ title: '金额',key: 'eachAmount', width: '10%', type: FormTypes.inputNumber, statistics: true, placeholder: '请选择${title}',
|
||||||
validateRules: [{ required: true, message: '${title}不能为空' }]
|
validateRules: [{ required: true, message: '${title}不能为空' }]
|
||||||
@@ -163,7 +163,6 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
created () {
|
created () {
|
||||||
this.initDetailAccount()
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
//调用完edit()方法之后会自动调用此方法
|
//调用完edit()方法之后会自动调用此方法
|
||||||
@@ -185,6 +184,9 @@
|
|||||||
let url = this.readOnly ? this.url.detailList : this.url.detailList;
|
let url = this.readOnly ? this.url.detailList : this.url.detailList;
|
||||||
this.requestSubTableData(url, params, this.accountTable);
|
this.requestSubTableData(url, params, this.accountTable);
|
||||||
}
|
}
|
||||||
|
this.initRetail()
|
||||||
|
this.initPerson()
|
||||||
|
this.initDetailAccount()
|
||||||
},
|
},
|
||||||
//提交单据时整理成formData
|
//提交单据时整理成formData
|
||||||
classifyIntoFormData(allValues) {
|
classifyIntoFormData(allValues) {
|
||||||
|
|||||||
@@ -58,7 +58,8 @@
|
|||||||
<a-row class="form-row" :gutter="24">
|
<a-row class="form-row" :gutter="24">
|
||||||
<a-col :lg="6" :md="12" :sm="24">
|
<a-col :lg="6" :md="12" :sm="24">
|
||||||
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="付款账户">
|
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="付款账户">
|
||||||
<a-select placeholder="选择付款账户" v-decorator="[ 'accountId', validatorRules.accountId ]" :dropdownMatchSelectWidth="false">
|
<a-select placeholder="选择付款账户" v-decorator="[ 'accountId', validatorRules.accountId ]"
|
||||||
|
:dropdownMatchSelectWidth="false" showSearch optionFilterProp="children">
|
||||||
<a-select-option v-for="(item,index) in accountList" :key="index" :value="item.id">
|
<a-select-option v-for="(item,index) in accountList" :key="index" :value="item.id">
|
||||||
{{ item.name }}
|
{{ item.name }}
|
||||||
</a-select-option>
|
</a-select-option>
|
||||||
@@ -125,7 +126,7 @@
|
|||||||
dataSource: [],
|
dataSource: [],
|
||||||
columns: [
|
columns: [
|
||||||
{ title: '账户名称',key: 'accountId',width: '20%', type: FormTypes.select, placeholder: '请选择${title}', options: [],
|
{ title: '账户名称',key: 'accountId',width: '20%', type: FormTypes.select, placeholder: '请选择${title}', options: [],
|
||||||
validateRules: [{ required: true, message: '${title}不能为空' }]
|
allowSearch:true, validateRules: [{ required: true, message: '${title}不能为空' }]
|
||||||
},
|
},
|
||||||
{ title: '金额',key: 'eachAmount', width: '10%', type: FormTypes.inputNumber, statistics: true, placeholder: '请选择${title}',
|
{ title: '金额',key: 'eachAmount', width: '10%', type: FormTypes.inputNumber, statistics: true, placeholder: '请选择${title}',
|
||||||
validateRules: [{ required: true, message: '${title}不能为空' }]
|
validateRules: [{ required: true, message: '${title}不能为空' }]
|
||||||
@@ -164,8 +165,6 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
created () {
|
created () {
|
||||||
this.initAccount()
|
|
||||||
this.initDetailAccount()
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
//调用完edit()方法之后会自动调用此方法
|
//调用完edit()方法之后会自动调用此方法
|
||||||
@@ -187,6 +186,9 @@
|
|||||||
let url = this.readOnly ? this.url.detailList : this.url.detailList;
|
let url = this.readOnly ? this.url.detailList : this.url.detailList;
|
||||||
this.requestSubTableData(url, params, this.accountTable);
|
this.requestSubTableData(url, params, this.accountTable);
|
||||||
}
|
}
|
||||||
|
this.initPerson()
|
||||||
|
this.initAccount()
|
||||||
|
this.initDetailAccount()
|
||||||
},
|
},
|
||||||
//提交单据时整理成formData
|
//提交单据时整理成formData
|
||||||
classifyIntoFormData(allValues) {
|
classifyIntoFormData(allValues) {
|
||||||
|
|||||||
@@ -66,7 +66,8 @@
|
|||||||
<a-row class="form-row" :gutter="24">
|
<a-row class="form-row" :gutter="24">
|
||||||
<a-col :lg="6" :md="12" :sm="24">
|
<a-col :lg="6" :md="12" :sm="24">
|
||||||
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="收入账户">
|
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="收入账户">
|
||||||
<a-select placeholder="选择收入账户" v-decorator="[ 'accountId', validatorRules.accountId ]" :dropdownMatchSelectWidth="false">
|
<a-select placeholder="选择收入账户" v-decorator="[ 'accountId', validatorRules.accountId ]"
|
||||||
|
:dropdownMatchSelectWidth="false" showSearch optionFilterProp="children">
|
||||||
<a-select-option v-for="(item,index) in accountList" :key="index" :value="item.id">
|
<a-select-option v-for="(item,index) in accountList" :key="index" :value="item.id">
|
||||||
{{ item.name }}
|
{{ item.name }}
|
||||||
</a-select-option>
|
</a-select-option>
|
||||||
@@ -133,7 +134,7 @@
|
|||||||
dataSource: [],
|
dataSource: [],
|
||||||
columns: [
|
columns: [
|
||||||
{ title: '收入项目',key: 'inOutItemId',width: '20%', type: FormTypes.select, placeholder: '请选择${title}', options: [],
|
{ title: '收入项目',key: 'inOutItemId',width: '20%', type: FormTypes.select, placeholder: '请选择${title}', options: [],
|
||||||
validateRules: [{ required: true, message: '${title}不能为空' }]
|
allowSearch:true, validateRules: [{ required: true, message: '${title}不能为空' }]
|
||||||
},
|
},
|
||||||
{ title: '金额',key: 'eachAmount', width: '10%', type: FormTypes.inputNumber, statistics: true, placeholder: '请选择${title}',
|
{ title: '金额',key: 'eachAmount', width: '10%', type: FormTypes.inputNumber, statistics: true, placeholder: '请选择${title}',
|
||||||
validateRules: [{ required: true, message: '${title}不能为空' }]
|
validateRules: [{ required: true, message: '${title}不能为空' }]
|
||||||
@@ -177,8 +178,6 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
created () {
|
created () {
|
||||||
this.initInOutItem('in')
|
|
||||||
this.initAccount()
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
//调用完edit()方法之后会自动调用此方法
|
//调用完edit()方法之后会自动调用此方法
|
||||||
@@ -200,6 +199,10 @@
|
|||||||
let url = this.readOnly ? this.url.detailList : this.url.detailList;
|
let url = this.readOnly ? this.url.detailList : this.url.detailList;
|
||||||
this.requestSubTableData(url, params, this.accountTable);
|
this.requestSubTableData(url, params, this.accountTable);
|
||||||
}
|
}
|
||||||
|
this.initCustomer()
|
||||||
|
this.initPerson()
|
||||||
|
this.initInOutItem('in')
|
||||||
|
this.initAccount()
|
||||||
},
|
},
|
||||||
//提交单据时整理成formData
|
//提交单据时整理成formData
|
||||||
classifyIntoFormData(allValues) {
|
classifyIntoFormData(allValues) {
|
||||||
|
|||||||
@@ -66,7 +66,8 @@
|
|||||||
<a-row class="form-row" :gutter="24">
|
<a-row class="form-row" :gutter="24">
|
||||||
<a-col :lg="6" :md="12" :sm="24">
|
<a-col :lg="6" :md="12" :sm="24">
|
||||||
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="支出账户">
|
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="支出账户">
|
||||||
<a-select placeholder="选择支出账户" v-decorator="[ 'accountId', validatorRules.accountId ]" :dropdownMatchSelectWidth="false">
|
<a-select placeholder="选择支出账户" v-decorator="[ 'accountId', validatorRules.accountId ]"
|
||||||
|
:dropdownMatchSelectWidth="false" showSearch optionFilterProp="children">
|
||||||
<a-select-option v-for="(item,index) in accountList" :key="index" :value="item.id">
|
<a-select-option v-for="(item,index) in accountList" :key="index" :value="item.id">
|
||||||
{{ item.name }}
|
{{ item.name }}
|
||||||
</a-select-option>
|
</a-select-option>
|
||||||
@@ -133,7 +134,7 @@
|
|||||||
dataSource: [],
|
dataSource: [],
|
||||||
columns: [
|
columns: [
|
||||||
{ title: '支出项目',key: 'inOutItemId',width: '20%', type: FormTypes.select, placeholder: '请选择${title}', options: [],
|
{ title: '支出项目',key: 'inOutItemId',width: '20%', type: FormTypes.select, placeholder: '请选择${title}', options: [],
|
||||||
validateRules: [{ required: true, message: '${title}不能为空' }]
|
allowSearch:true, validateRules: [{ required: true, message: '${title}不能为空' }]
|
||||||
},
|
},
|
||||||
{ title: '金额',key: 'eachAmount', width: '10%', type: FormTypes.inputNumber, statistics: true, placeholder: '请选择${title}',
|
{ title: '金额',key: 'eachAmount', width: '10%', type: FormTypes.inputNumber, statistics: true, placeholder: '请选择${title}',
|
||||||
validateRules: [{ required: true, message: '${title}不能为空' }]
|
validateRules: [{ required: true, message: '${title}不能为空' }]
|
||||||
@@ -177,8 +178,6 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
created () {
|
created () {
|
||||||
this.initInOutItem('out')
|
|
||||||
this.initAccount()
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
//调用完edit()方法之后会自动调用此方法
|
//调用完edit()方法之后会自动调用此方法
|
||||||
@@ -200,6 +199,10 @@
|
|||||||
let url = this.readOnly ? this.url.detailList : this.url.detailList;
|
let url = this.readOnly ? this.url.detailList : this.url.detailList;
|
||||||
this.requestSubTableData(url, params, this.accountTable);
|
this.requestSubTableData(url, params, this.accountTable);
|
||||||
}
|
}
|
||||||
|
this.initSupplier()
|
||||||
|
this.initPerson()
|
||||||
|
this.initInOutItem('out')
|
||||||
|
this.initAccount()
|
||||||
},
|
},
|
||||||
//提交单据时整理成formData
|
//提交单据时整理成formData
|
||||||
classifyIntoFormData(allValues) {
|
classifyIntoFormData(allValues) {
|
||||||
|
|||||||
@@ -81,7 +81,8 @@
|
|||||||
<a-row class="form-row" :gutter="24">
|
<a-row class="form-row" :gutter="24">
|
||||||
<a-col :lg="6" :md="12" :sm="24">
|
<a-col :lg="6" :md="12" :sm="24">
|
||||||
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="收款账户">
|
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="收款账户">
|
||||||
<a-select placeholder="选择收款账户" v-decorator="[ 'accountId', validatorRules.accountId ]" :dropdownMatchSelectWidth="false">
|
<a-select placeholder="选择收款账户" v-decorator="[ 'accountId', validatorRules.accountId ]"
|
||||||
|
:dropdownMatchSelectWidth="false" showSearch optionFilterProp="children">
|
||||||
<a-select-option v-for="(item,index) in accountList" :key="index" :value="item.id">
|
<a-select-option v-for="(item,index) in accountList" :key="index" :value="item.id">
|
||||||
{{ item.name }}
|
{{ item.name }}
|
||||||
</a-select-option>
|
</a-select-option>
|
||||||
@@ -192,7 +193,6 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
created () {
|
created () {
|
||||||
this.initAccount()
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
//调用完edit()方法之后会自动调用此方法
|
//调用完edit()方法之后会自动调用此方法
|
||||||
@@ -214,6 +214,9 @@
|
|||||||
let url = this.readOnly ? this.url.detailList : this.url.detailList;
|
let url = this.readOnly ? this.url.detailList : this.url.detailList;
|
||||||
this.requestSubTableData(url, params, this.accountTable);
|
this.requestSubTableData(url, params, this.accountTable);
|
||||||
}
|
}
|
||||||
|
this.initCustomer()
|
||||||
|
this.initPerson()
|
||||||
|
this.initAccount()
|
||||||
},
|
},
|
||||||
//提交单据时整理成formData
|
//提交单据时整理成formData
|
||||||
classifyIntoFormData(allValues) {
|
classifyIntoFormData(allValues) {
|
||||||
|
|||||||
@@ -81,7 +81,8 @@
|
|||||||
<a-row class="form-row" :gutter="24">
|
<a-row class="form-row" :gutter="24">
|
||||||
<a-col :lg="6" :md="12" :sm="24">
|
<a-col :lg="6" :md="12" :sm="24">
|
||||||
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="付款账户">
|
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="付款账户">
|
||||||
<a-select placeholder="选择付款账户" v-decorator="[ 'accountId', validatorRules.accountId ]" :dropdownMatchSelectWidth="false">
|
<a-select placeholder="选择付款账户" v-decorator="[ 'accountId', validatorRules.accountId ]"
|
||||||
|
:dropdownMatchSelectWidth="false" showSearch optionFilterProp="children">
|
||||||
<a-select-option v-for="(item,index) in accountList" :key="index" :value="item.id">
|
<a-select-option v-for="(item,index) in accountList" :key="index" :value="item.id">
|
||||||
{{ item.name }}
|
{{ item.name }}
|
||||||
</a-select-option>
|
</a-select-option>
|
||||||
@@ -195,7 +196,6 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
created () {
|
created () {
|
||||||
this.initAccount()
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
//调用完edit()方法之后会自动调用此方法
|
//调用完edit()方法之后会自动调用此方法
|
||||||
@@ -217,6 +217,9 @@
|
|||||||
let url = this.readOnly ? this.url.detailList : this.url.detailList;
|
let url = this.readOnly ? this.url.detailList : this.url.detailList;
|
||||||
this.requestSubTableData(url, params, this.accountTable);
|
this.requestSubTableData(url, params, this.accountTable);
|
||||||
}
|
}
|
||||||
|
this.initSupplier()
|
||||||
|
this.initPerson()
|
||||||
|
this.initAccount()
|
||||||
},
|
},
|
||||||
//提交单据时整理成formData
|
//提交单据时整理成formData
|
||||||
classifyIntoFormData(allValues) {
|
classifyIntoFormData(allValues) {
|
||||||
|
|||||||
Reference in New Issue
Block a user