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

master
wws 1 year ago
parent 540d9f7a3f
commit a2f49f57a1

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

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

Loading…
Cancel
Save