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