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

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

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

Loading…
Cancel
Save