11/19 界面优化1

dev_unify
wangwei 8 months ago
parent 4b2a752c6f
commit 60ab09fb9a

@ -412,7 +412,7 @@ export default {
productType: 2 productType: 2
}, },
viewType: 4, viewType: 3,
checkStatus: { checkStatus: {
1: "草稿", 1: "草稿",
2: "等待处理", 2: "等待处理",

@ -479,7 +479,7 @@
<selectProduct <selectProduct
:closeSelDialog="closeSelDialog" :closeSelDialog="closeSelDialog"
:uuid="uuid" :uuid="uuid"
:nameCodes="nameCodes" :productIds="productIds"
></selectProduct> ></selectProduct>
</el-dialog> </el-dialog>
@ -610,7 +610,7 @@ export default {
checked: false, checked: false,
list: [], list: [],
allProduct:[], allProduct:[],
nameCodes:[], productIds:[],
detailList: [], detailList: [],
sysList: [], sysList: [],
filterList: [], filterList: [],
@ -993,7 +993,7 @@ export default {
this.multipleSelection = val; this.multipleSelection = val;
}, },
closeSelDialog(val) { closeSelDialog(val) {
this.nameCodes = [] this.productIds = []
this.selectProductVisible = false; this.selectProductVisible = false;
this.addProductVisible = false; this.addProductVisible = false;
this.getList(); this.getList();
@ -1226,7 +1226,7 @@ export default {
.then((response) => { .then((response) => {
this.allProduct = response.data.list ; this.allProduct = response.data.list ;
if (this.allProduct.length > 0){ if (this.allProduct.length > 0){
this.nameCodes = this.allProduct.map(item => item.nameCode) this.productIds = this.allProduct.map(item => item.prid)
} }
this.selectProductVisible = true; this.selectProductVisible = true;
}) })

@ -89,7 +89,7 @@
:header-cell-class-name="cellClass" @current-change="handleSelectionChange"> :header-cell-class-name="cellClass" @current-change="handleSelectionChange">
<el-table-column label width="45"> <el-table-column label width="45">
<template slot-scope="scope"> <template slot-scope="scope">
<el-radio :label="scope.row.nameCode" v-model="radioCheck" :disabled="isDisabled(scope.row.nameCode)"><span></span></el-radio> <el-radio :label="scope.row.productId" v-model="radioCheck" :disabled="isDisabled(scope.row.productId)"><span></span></el-radio>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="序号" type="index"></el-table-column> <el-table-column label="序号" type="index"></el-table-column>
@ -799,7 +799,7 @@ export default {
type: Function, type: Function,
required: true, required: true,
}, },
nameCodes: { productIds: {
type: Array, type: Array,
required: true, required: true,
} }
@ -1147,10 +1147,10 @@ export default {
}); });
}, },
handleSelectionChange(selection) { handleSelectionChange(selection) {
if (this.nameCodes.includes(selection.nameCode)){ if (this.productIds.includes(selection.productId)){
return return
}else{ }else{
this.radioCheck = selection.nameCode; this.radioCheck = selection.productId;
} }
this.curSelectDi = selection; this.curSelectDi = selection;
@ -1184,9 +1184,9 @@ export default {
// } // }
}, },
isDisabled(nameCode){ isDisabled(productId){
if (this.nameCodes.length > 0){ if (this.productIds.length > 0){
return this.nameCodes.includes(nameCode); return this.productIds.includes(productId);
} }
}, },
handleErpChange(val) { handleErpChange(val) {

@ -570,14 +570,21 @@ export default {
let query = { let query = {
id: row.id, id: row.id,
}; };
delThrDiProducts(query).then((res) => { _this.$confirm('此操作将删除该产品,是否继续?', '提示', {
if (res.code === 20000) { confirmButtonText: '确定',
_this.$message.success("删除成功"); cancelButtonText: '取消',
_this.getList(); type: 'warning'
} else { }).then(() => {
_this.$message.error("删除失败"); delThrDiProducts(query).then((res) => {
} if (res.code === 20000) {
}); _this.$message.success("删除成功");
_this.getList();
} else {
_this.$message.error("删除失败");
}
});
}).catch(() => {})
}, },
closeDialog() { closeDialog() {
this.selectErpDialogVisible = false; this.selectErpDialogVisible = false;

Loading…
Cancel
Save