|
|
@ -94,12 +94,14 @@ |
|
|
|
import {mapGetters} from "vuex"; |
|
|
|
import {mapGetters} from "vuex"; |
|
|
|
import expUtil from "@/util/exportUtil"; |
|
|
|
import expUtil from "@/util/exportUtil"; |
|
|
|
import {getToken} from "@/util/auth"; |
|
|
|
import {getToken} from "@/util/auth"; |
|
|
|
|
|
|
|
import request from "@/router/axios"; |
|
|
|
|
|
|
|
|
|
|
|
export default { |
|
|
|
export default { |
|
|
|
data() { |
|
|
|
data() { |
|
|
|
return { |
|
|
|
return { |
|
|
|
form: {}, |
|
|
|
form: {}, |
|
|
|
query: {}, |
|
|
|
query: {}, |
|
|
|
|
|
|
|
search:{}, |
|
|
|
loading: true, |
|
|
|
loading: true, |
|
|
|
inBox: false, |
|
|
|
inBox: false, |
|
|
|
outBox: false, |
|
|
|
outBox: false, |
|
|
@ -254,6 +256,29 @@ |
|
|
|
prop: "materialNo", |
|
|
|
prop: "materialNo", |
|
|
|
type:"select", |
|
|
|
type:"select", |
|
|
|
span: 22, |
|
|
|
span: 22, |
|
|
|
|
|
|
|
dicUrl: "/api/spares/material/getNoList", |
|
|
|
|
|
|
|
props: { |
|
|
|
|
|
|
|
label: "materialNo", |
|
|
|
|
|
|
|
value: "materialNo", |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
event: { |
|
|
|
|
|
|
|
change: (val) => { |
|
|
|
|
|
|
|
if (!val) return |
|
|
|
|
|
|
|
if (val) { |
|
|
|
|
|
|
|
request({ |
|
|
|
|
|
|
|
url: '/api/spares/material/getDetailList', |
|
|
|
|
|
|
|
method: 'get', |
|
|
|
|
|
|
|
params: { |
|
|
|
|
|
|
|
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; |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
}, |
|
|
|
rules: [{ |
|
|
|
rules: [{ |
|
|
|
required: true, |
|
|
|
required: true, |
|
|
|
message: "请输入物资编号", |
|
|
|
message: "请输入物资编号", |
|
|
@ -322,6 +347,29 @@ |
|
|
|
label: "物资编号", |
|
|
|
label: "物资编号", |
|
|
|
prop: "materialNo", |
|
|
|
prop: "materialNo", |
|
|
|
span: 22, |
|
|
|
span: 22, |
|
|
|
|
|
|
|
dicUrl: "/api/spares/material/getNoList", |
|
|
|
|
|
|
|
props: { |
|
|
|
|
|
|
|
label: "materialNo", |
|
|
|
|
|
|
|
value: "materialNo", |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
event: { |
|
|
|
|
|
|
|
change: (val) => { |
|
|
|
|
|
|
|
if (!val) return |
|
|
|
|
|
|
|
if (val) { |
|
|
|
|
|
|
|
request({ |
|
|
|
|
|
|
|
url: '/api/spares/material/getDetailList', |
|
|
|
|
|
|
|
method: 'get', |
|
|
|
|
|
|
|
params: { |
|
|
|
|
|
|
|
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; |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
}, |
|
|
|
rules: [{ |
|
|
|
rules: [{ |
|
|
|
required: true, |
|
|
|
required: true, |
|
|
|
message: "请输入物资编号", |
|
|
|
message: "请输入物资编号", |
|
|
@ -455,13 +503,14 @@ |
|
|
|
}, |
|
|
|
}, |
|
|
|
handleIn(){ |
|
|
|
handleIn(){ |
|
|
|
this.inBox = true; |
|
|
|
this.inBox = true; |
|
|
|
|
|
|
|
this.$refs.inForm.resetForm(); |
|
|
|
}, |
|
|
|
}, |
|
|
|
submitIn(row, done, loading) { |
|
|
|
submitIn(row, done, loading) { |
|
|
|
this.$refs.inForm.validate((valid, done, msg) => { |
|
|
|
this.$refs.inForm.validate((valid, done, msg) => { |
|
|
|
if (valid) { |
|
|
|
if (valid) { |
|
|
|
done() |
|
|
|
done() |
|
|
|
in_add(this.inForm).then(() => { |
|
|
|
in_add(this.inForm).then(() => { |
|
|
|
this.$refs.inForm.inForm(); |
|
|
|
this.$refs.inForm.resetForm(); |
|
|
|
this.inBox = false; |
|
|
|
this.inBox = false; |
|
|
|
this.onLoad(this.page); |
|
|
|
this.onLoad(this.page); |
|
|
|
this.$message({ |
|
|
|
this.$message({ |
|
|
@ -482,13 +531,14 @@ |
|
|
|
}, |
|
|
|
}, |
|
|
|
handleOut(){ |
|
|
|
handleOut(){ |
|
|
|
this.outBox = true; |
|
|
|
this.outBox = true; |
|
|
|
|
|
|
|
this.$refs.outForm.resetForm(); |
|
|
|
}, |
|
|
|
}, |
|
|
|
submitOut(row, done, loading) { |
|
|
|
submitOut(row, done, loading) { |
|
|
|
this.$refs.outForm.validate((valid, done, msg) => { |
|
|
|
this.$refs.outForm.validate((valid, done, msg) => { |
|
|
|
if (valid) { |
|
|
|
if (valid) { |
|
|
|
done() |
|
|
|
done() |
|
|
|
out_add(this.outForm).then(() => { |
|
|
|
out_add(this.outForm).then(() => { |
|
|
|
this.$refs.outForm.outForm(); |
|
|
|
this.$refs.outForm.resetForm(); |
|
|
|
this.outBox = false; |
|
|
|
this.outBox = false; |
|
|
|
this.onLoad(this.page); |
|
|
|
this.onLoad(this.page); |
|
|
|
this.$message({ |
|
|
|
this.$message({ |
|
|
@ -513,7 +563,7 @@ |
|
|
|
cancelButtonText: "取消", |
|
|
|
cancelButtonText: "取消", |
|
|
|
type: "warning" |
|
|
|
type: "warning" |
|
|
|
}).then(() => { |
|
|
|
}).then(() => { |
|
|
|
expUtil.excelExport(`/api/spares/export?daf-auth=${getToken()}`, this.search, ['station', 'iStatus']); |
|
|
|
expUtil.excelExport(`/api/spares/material/export?daf-auth=${getToken()}`, this.search, ['station']); |
|
|
|
}); |
|
|
|
}); |
|
|
|
}, |
|
|
|
}, |
|
|
|
handleDetailSearch(row) { |
|
|
|
handleDetailSearch(row) { |
|
|
|