|
|
@ -6,6 +6,7 @@ |
|
|
|
:page="page" |
|
|
|
:page="page" |
|
|
|
:permission="permissionList" |
|
|
|
:permission="permissionList" |
|
|
|
:before-open="beforeOpen" |
|
|
|
:before-open="beforeOpen" |
|
|
|
|
|
|
|
:search.sync="search" |
|
|
|
v-model="form" |
|
|
|
v-model="form" |
|
|
|
ref="crud" |
|
|
|
ref="crud" |
|
|
|
:header-cell-class-name="headerClass" |
|
|
|
:header-cell-class-name="headerClass" |
|
|
@ -98,6 +99,15 @@ |
|
|
|
|
|
|
|
|
|
|
|
export default { |
|
|
|
export default { |
|
|
|
data() { |
|
|
|
data() { |
|
|
|
|
|
|
|
var validateCount = (rule, value, callback) => { |
|
|
|
|
|
|
|
if (value === '') { |
|
|
|
|
|
|
|
callback(new Error('请输入出库数量')); |
|
|
|
|
|
|
|
} else if(this.count < value) { |
|
|
|
|
|
|
|
callback(new Error('输入的出库数量大于库存数量')); |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
callback(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}; |
|
|
|
return { |
|
|
|
return { |
|
|
|
form: {}, |
|
|
|
form: {}, |
|
|
|
query: {}, |
|
|
|
query: {}, |
|
|
@ -105,6 +115,7 @@ |
|
|
|
loading: true, |
|
|
|
loading: true, |
|
|
|
inBox: false, |
|
|
|
inBox: false, |
|
|
|
outBox: false, |
|
|
|
outBox: false, |
|
|
|
|
|
|
|
count: null, |
|
|
|
page: { |
|
|
|
page: { |
|
|
|
pageSize: 10, |
|
|
|
pageSize: 10, |
|
|
|
currentPage: 1, |
|
|
|
currentPage: 1, |
|
|
@ -116,6 +127,8 @@ |
|
|
|
calcHeight: 210, |
|
|
|
calcHeight: 210, |
|
|
|
searchShow: true, |
|
|
|
searchShow: true, |
|
|
|
searchMenuSpan: 6, |
|
|
|
searchMenuSpan: 6, |
|
|
|
|
|
|
|
searchBtnText: '查询', |
|
|
|
|
|
|
|
emptyBtnText: '重置', |
|
|
|
tip: false, |
|
|
|
tip: false, |
|
|
|
border: true, |
|
|
|
border: true, |
|
|
|
index: false, |
|
|
|
index: false, |
|
|
@ -190,7 +203,7 @@ |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
{ |
|
|
|
label: "供应商名称", |
|
|
|
label: "供应商名称", |
|
|
|
prop: "sipplierName", |
|
|
|
prop: "supplierName", |
|
|
|
hide: true, |
|
|
|
hide: true, |
|
|
|
rules: [{ |
|
|
|
rules: [{ |
|
|
|
required: true, |
|
|
|
required: true, |
|
|
@ -274,7 +287,7 @@ |
|
|
|
}).then((res) => { |
|
|
|
}).then((res) => { |
|
|
|
this.inForm.materialName = res.data.data.materialName; |
|
|
|
this.inForm.materialName = res.data.data.materialName; |
|
|
|
this.inForm.model = res.data.data.model; |
|
|
|
this.inForm.model = res.data.data.model; |
|
|
|
// this.inForm.warehouse = res.data.data.warehouseName; |
|
|
|
this.inForm.warehouse = res.data.data.warehouseName; |
|
|
|
}) |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
@ -346,6 +359,7 @@ |
|
|
|
{ |
|
|
|
{ |
|
|
|
label: "物资编号", |
|
|
|
label: "物资编号", |
|
|
|
prop: "materialNo", |
|
|
|
prop: "materialNo", |
|
|
|
|
|
|
|
type: "select", |
|
|
|
span: 22, |
|
|
|
span: 22, |
|
|
|
dicUrl: "/api/spares/material/getNoList", |
|
|
|
dicUrl: "/api/spares/material/getNoList", |
|
|
|
props: { |
|
|
|
props: { |
|
|
@ -363,9 +377,11 @@ |
|
|
|
materialNo: val |
|
|
|
materialNo: val |
|
|
|
} |
|
|
|
} |
|
|
|
}).then((res) => { |
|
|
|
}).then((res) => { |
|
|
|
this.inForm.materialName = res.data.data.materialName; |
|
|
|
this.outForm.materialName = res.data.data.materialName; |
|
|
|
this.inForm.model = res.data.data.model; |
|
|
|
this.outForm.model = res.data.data.model; |
|
|
|
// this.inForm.warehouse = res.data.data.warehouseName; |
|
|
|
this.outForm.warehouse = res.data.data.warehouseName; |
|
|
|
|
|
|
|
this.count = res.data.data.inventoryCount; |
|
|
|
|
|
|
|
; |
|
|
|
}) |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
@ -399,11 +415,7 @@ |
|
|
|
label: "出库数量", |
|
|
|
label: "出库数量", |
|
|
|
prop: "outboundCount", |
|
|
|
prop: "outboundCount", |
|
|
|
span: 22, |
|
|
|
span: 22, |
|
|
|
rules: [{ |
|
|
|
rules: [{required: true, validator: validateCount, trigger: 'blur' }] |
|
|
|
required: true, |
|
|
|
|
|
|
|
message: "请输入入库数量", |
|
|
|
|
|
|
|
trigger: "blur" |
|
|
|
|
|
|
|
}] |
|
|
|
|
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
{ |
|
|
|
label: "出库申领人", |
|
|
|
label: "出库申领人", |
|
|
@ -563,7 +575,7 @@ |
|
|
|
cancelButtonText: "取消", |
|
|
|
cancelButtonText: "取消", |
|
|
|
type: "warning" |
|
|
|
type: "warning" |
|
|
|
}).then(() => { |
|
|
|
}).then(() => { |
|
|
|
expUtil.excelExport(`/api/spares/material/export?daf-auth=${getToken()}`, this.search, ['station']); |
|
|
|
expUtil.excelExportEasy(`/api/spares/material/export?daf-auth=${getToken()}`, this.search); |
|
|
|
}); |
|
|
|
}); |
|
|
|
}, |
|
|
|
}, |
|
|
|
handleDetailSearch(row) { |
|
|
|
handleDetailSearch(row) { |
|
|
@ -572,6 +584,7 @@ |
|
|
|
query: { |
|
|
|
query: { |
|
|
|
frameMode:"view", |
|
|
|
frameMode:"view", |
|
|
|
id: row.id, |
|
|
|
id: row.id, |
|
|
|
|
|
|
|
materialNo: row.materialNo, |
|
|
|
}, |
|
|
|
}, |
|
|
|
}); |
|
|
|
}); |
|
|
|
}, |
|
|
|
}, |
|
|
|