Browse Source

2023-11-3

master
guoxing 2 years ago
parent
commit
65ef80321a
  1. 2
      warehousing-system/project_web_ui-xxs/src/api/supervise/commodityFile.js
  2. 4
      warehousing-system/project_web_ui-xxs/src/views/brand/brandManagementInfoAdd.vue
  3. 125
      warehousing-system/project_web_ui-xxs/src/views/component/initial_value/add/productAdd.vue

2
warehousing-system/project_web_ui-xxs/src/api/supervise/commodityFile.js

@ -17,7 +17,7 @@ export default {
brandDelBySids: function(sid) {
return request({
url: '/v1/restrictedbrand/delBySid/' + sid,
method: 'delete'
method: 'get'
})
},
// 品牌品类 保存品牌品类

4
warehousing-system/project_web_ui-xxs/src/views/brand/brandManagementInfoAdd.vue

@ -18,11 +18,11 @@
<el-card class="box-card">
<div class="item">
<span class="item_text">品牌名称</span>
<el-input v-model="formobj.name" placeholder="" class="item_input" clearable />
<el-input v-model="formobj.name" placeholder=""maxlength="20"class="item_input" clearable />
</div>
<div class="item">
<span class="item_text">品牌编码</span>
<el-input v-model="formobj.code" placeholder="" class="item_input" clearable />
<el-input v-model="formobj.code" placeholder="" maxlength="20" class="item_input" clearable />
</div>
</el-card>

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

@ -16,12 +16,17 @@
<el-card class="box-card">
<div class="item">
<span class="item_text">条码</span>
<el-input v-model="locationForm.barCode" placeholder="" class="item_input" clearable />
<!-- <el-button type="primary" size="small" @click="createBarCode" :disabled="disabledCode">随机</el-button>-->
</div>
<div class="item">
<span class="item_text">商品名</span>
<div style=" flex: 0.8;display: flex;flex-direction: row;">
<div style="flex: 1;"></div>
<span style="color: #f00;margin-right: 5px;margin-top: 4px;">*</span>
<span style="font-size: 18px;">商品名</span>
</div>
<el-input v-model="locationForm.name" placeholder="" class="item_input" clearable />
</div>
<div class="item">
@ -33,28 +38,44 @@
<el-input v-model="locationForm.code" :disabled="true" class="item_input" clearable></el-input>
</div>
<div class="item">
<span class="item_text">品牌</span>
<div style=" flex: 0.8;display: flex;flex-direction: row;">
<div style="flex: 1;"></div>
<span style="color: #f00;margin-right: 5px;margin-top: 4px;">*</span>
<span style="font-size: 18px;">品牌</span>
</div>
<el-select v-model="locationForm.brand" @change="selectBrand" class="item_input" placeholder="请选择">
<el-option v-for="(item,i) in brandList" :key="i" :label="item.dictValue" :value="item.sid">
</el-option>
</el-select>
</div>
<div class="item">
<span class="item_text">一级类别</span>
<div style=" flex: 0.8;display: flex;flex-direction: row;">
<div style="flex: 1;"></div>
<span style="color: #f00;margin-right: 5px;margin-top: 4px;">*</span>
<span style="font-size: 18px;">一级类别</span>
</div>
<el-select v-model="locationForm.categoryY" @change="selectCategoryA" class="item_input" placeholder="请选择">
<el-option v-for="(item,i) in categoryAList" :key="i" :label="item.categorys" :value="item.sid">
</el-option>
</el-select>
</div>
<div class="item">
<span class="item_text">二级类别</span>
<div style=" flex: 0.8;display: flex;flex-direction: row;">
<div style="flex: 1;"></div>
<span style="color: #f00;margin-right: 5px;margin-top: 4px;">*</span>
<span style="font-size: 18px;">二级类别</span>
</div>
<el-select v-model="locationForm.categoryR" @change="selectCategoryB" class="item_input" placeholder="请选择">
<el-option v-for="(item,i) in categoryBList" :key="i" :label="item.categorys" :value="item.sid">
</el-option>
</el-select>
</div>
<div class="item">
<span class="item_text">三级类别</span>
<div style=" flex: 0.8;display: flex;flex-direction: row;">
<div style="flex: 1;"></div>
<span style="color: #f00;margin-right: 5px;margin-top: 4px;">*</span>
<span style="font-size: 18px;">三级类别</span>
</div>
<el-select v-model="locationForm.category" @change="selectCategoryC" class="item_input" placeholder="请选择">
<el-option v-for="(item,i) in categoryCList" :key="i" :label="item.categorys" :value="item.sid">
</el-option>
@ -105,7 +126,7 @@
roughWeight: "",
effectiveDays: "",
remarks: "",
brand:"",
brand: "",
brandSid: "",
categoryY: "",
categorySidY: "",
@ -179,7 +200,7 @@
this.categoryPSid = value
this.locationForm.categoryAsid = value
this.locationForm.categorySidY = value
this.getCategoryList("2")
@ -193,7 +214,7 @@
this.locationForm.categorySid = ''
this.categoryPSid = value
this.locationForm.categoryBsid = value
this.locationForm.categorySidR = value
this.getCategoryList("3")
@ -202,8 +223,17 @@
console.log("selectCategoryB", value)
},
selectCategoryC(value) {
this.$forceUpdate();
console.log("selectCategoryC", value)
var item = this.categoryCList.find(item => item.sid == value)
console.log("selectCategoryC", item)
this.locationForm.categorySid = value
this.locationForm.category = item.categorys
},
saveOrUpdate() {
@ -230,18 +260,19 @@
name: "",
anotherName: "",
value: "",
code:"系统自动排序生成",
code: "系统自动排序生成",
netWeight: "",
roughWeight: "",
effectiveDays: "",
remarks: "",
brandSid: "",
categoryA: "",
categoryAsid: "",
categoryB: "",
categoryBsid: "",
categoryC: "",
categorySid: "",
brand: "",
brandSid: "",
categoryY: "",
categorySidY: "",
categoryR: "",
categorySidR: "",
category: "",
categorySid: "",
}
},
showEdit(row) {
@ -252,7 +283,34 @@
},
async updataProduct() {
console.log("updataProduct", this.locationForm)
console.log("updataProduct", this.locationForm)
if(!this.locationForm.name){
this.$message.error('商品名称不能为空')
return
}
if(!this.locationForm.brandSid){
this.$message.error('商品品牌不能为空')
return
}
if(!this.locationForm.categorySidY){
this.$message.error('一级类别不能为空')
return
}
if(!this.locationForm.categorySidR){
this.$message.error('二级类别不能为空')
return
}
if(!this.locationForm.categorySid){
this.$message.error('三级类别不能为空')
return
}
const {
data: result
@ -262,7 +320,35 @@
this.handleReturn('true')
},
async addProduct() {
console.log("addProduct", this.locationForm)
if(!this.locationForm.name){
this.$message.error('商品名称不能为空')
return
}
if(!this.locationForm.brandSid){
this.$message.error('商品品牌不能为空')
return
}
if(!this.locationForm.categorySidY){
this.$message.error('一级类别不能为空')
return
}
if(!this.locationForm.categorySidR){
this.$message.error('二级类别不能为空')
return
}
if(!this.locationForm.categorySid){
this.$message.error('三级类别不能为空')
return
}
console.log("addProduct", this.locationForm)
const {
data: result
} = await this.$http.post('/product/addProduct', this.locationForm)
@ -326,9 +412,8 @@
line-height: 40px;
.item_text {
flex: 0.8;
font-size: 18px;
text-align: right;
}
.item_input {

Loading…
Cancel
Save