计划模块(新增逻辑修改)

master
wws 1 year ago
parent 540d9f7a3f
commit a2f49f57a1

@ -1,10 +1,11 @@
import request from '@/utils/request' import request from '@/utils/request'
// 获取物料list // 获取物料list
export function selectMaterielList() { export function selectMaterielList(query) {
return request({ return request({
url: '/plan/product/list', url: '/plan/product/list',
method: 'get' method: 'get',
params: query
}) })
} }

@ -87,7 +87,7 @@
plain plain
icon="el-icon-plus" icon="el-icon-plus"
size="mini" size="mini"
@click="dialogVisible = true" @click="setUp"
v-hasPermi="['mes:pro:order:add']" v-hasPermi="['mes:pro:order:add']"
>新增 >新增
</el-button> </el-button>
@ -642,8 +642,22 @@ export default {
}) })
}, },
methods: { methods: {
//
setUp() {
this.dialogVisible = true;
//
this.form.prodCode = null;
this.form.prodDesc = null;
},
// //
subMateriel() { subMateriel() {
if (this.materiel.length == 0) {
this.$message({
message: '请选择物料!',
type: 'warning'
})
return
}
if (this.materiel.length > 1) { if (this.materiel.length > 1) {
this.$message({ this.$message({
message: '物料只能选择一个!', message: '物料只能选择一个!',
@ -654,19 +668,15 @@ export default {
this.form.prodCode = this.materiel[0].productCode; this.form.prodCode = this.materiel[0].productCode;
this.form.prodDesc = this.materiel[0].productDescZh; this.form.prodDesc = this.materiel[0].productDescZh;
this.innerVisible = false; this.innerVisible = false;
console.log(this.materiel)
console.log(12312)
console.log(this.form)
}, },
// //
handleSelectionChange(e) { handleSelectionChange(e) {
console.log("选中了物料信息")
this.materiel = e; this.materiel = e;
}, },
// //
getMaterielList() { getMaterielList() {
this.loading = true; this.loading = true;
selectMaterielList(this.addDateRange(this.materielQueryParams, this.dateRange)).then(response => { selectMaterielList(this.materielQueryParams).then(response => {
this.materielList = response.rows; this.materielList = response.rows;
this.total = response.total; this.total = response.total;
this.loading = false; this.loading = false;
@ -675,7 +685,6 @@ export default {
}, },
// //
selectMateriel() { selectMateriel() {
console.log("点击了选择物料")
this.innerVisible = true; this.innerVisible = true;
this.getMaterielList(); this.getMaterielList();
}, },
@ -1200,7 +1209,7 @@ export default {
}, },
// //
handleMaterielQuery() { handleMaterielQuery() {
console.log("进行了查询功能") this.materielQueryParams.pageNum = 1;
this.getMaterielList(); this.getMaterielList();
}, },
/** 搜索按钮操作 */ /** 搜索按钮操作 */
@ -1209,6 +1218,7 @@ export default {
}, },
// //
resetMaterielQuery() { resetMaterielQuery() {
// TODO
console.log("进行了物料重置") console.log("进行了物料重置")
}, },
/** 重置按钮操作 */ /** 重置按钮操作 */

Loading…
Cancel
Save