Browse Source

修改产品的新增

master
djz236@163.com 2 years ago
parent
commit
6aaa958656
  1. 15
      warehousing-system/project_web_ui-xxs/src/views/component/initial_value/add/productAdd.vue
  2. 24
      warehousing-system/project_web_ui-xxs/src/views/component/outStorehouseManagement/add/outListAdd.vue

15
warehousing-system/project_web_ui-xxs/src/views/component/initial_value/add/productAdd.vue

@ -17,12 +17,12 @@
<el-card class="box-card">
<div class="item">
<span class="item_text">条码</span>
<el-input v-model="locationForm.barCode" :disabled="disabledCode" placeholder="" class="item_inputs" clearable />
<el-button type="primary" size="small" @click="createBarCode" :disabled="disabledCode">随机</el-button>
<el-input v-model="locationForm.barCode" placeholder="" class="item_inputs" clearable />
<!-- <el-button type="primary" size="small" @click="createBarCode" :disabled="disabledCode">随机</el-button>-->
</div>
<div class="item">
<span class="item_text">商品名</span>
<el-input v-model="locationForm.name" :disabled="disabledCode" placeholder="" class="item_input" clearable />
<el-input v-model="locationForm.name" placeholder="" class="item_input" clearable />
</div>
<div class="item">
<span class="item_text">别名</span>
@ -108,15 +108,16 @@
}
},
showEdit(row) {
console.log(row);
this.viewTitle = "【修改】产品信息";
this.disabledCode=true
this.locationForm=row
},
async updataProduct () {
this.locationForm = {
name: "",
anotherName: "",
}
// this.locationForm = {
// name: "",
// anotherName: "",
// }
const { data: result } = await this.$http.put('/product/updataProduct', this.locationForm)
if (result.status !== 200) return this.$message.error('更新数据失败')
this.$message.success('更新成功')

24
warehousing-system/project_web_ui-xxs/src/views/component/outStorehouseManagement/add/outListAdd.vue

@ -195,7 +195,7 @@
storeHouseSid:"",
custerName:'',
custerSid:'',
list:[],
list:[]
// outDate:""
},
zhiwuName:"",
@ -329,8 +329,24 @@
addStorehouse(){
this.$refs.dataForm.validate(async validate => {
if (!validate) return this.$message.error('请填写必填项')
var purList= this.purchaseForm.list;
var f=false;
for(let i=0;i<purList.length;i++){
var proSid=purList[i].proSid;
if(proSid==null||proSid==''){
f=true;
}
// console.log(proSid);
}
if(f){
this.$message({
message: '请添加质物信息',
type: 'warning'
});
}
console.log(this.purchaseForm.list);
// this.purchaseForm.status = ''
if(this.zhiwuName){
/*if(this.zhiwuName){*/
const { data: result } = await this.$http.post('/output/addOutStorehouse', this.purchaseForm)
if (result.code == 200) {
this.$message({ type: 'success', message: result.msg, showClose: true })
@ -339,12 +355,12 @@
}else if(result.code == 500){
this.$message.error(result.msg)
}
}else{
/* }else{
this.$message({
message: '请添加质物信息',
type: 'warning'
});
}
}*/
})
},

Loading…
Cancel
Save