|
|
@ -67,7 +67,8 @@ |
|
|
|
<el-col :span="6"> |
|
|
|
<div class="span-sty">商品类别</div> |
|
|
|
<el-form-item> |
|
|
|
<el-select v-model="formobj.typeName" placeholder="请选择商品类别" class="addinputw" @change="selectCateChange"> |
|
|
|
<el-select v-model="formobj.goodsTypeName" placeholder="请选择商品类别" class="addinputw" |
|
|
|
@change="selectCateChange"> |
|
|
|
<el-option v-for="item in cateList" :key="item.sid" :label="item.goodsTypeName" :value="item.sid" /> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
@ -77,7 +78,7 @@ |
|
|
|
<el-col :span="6"> |
|
|
|
<div class="span-sty">规格</div> |
|
|
|
<el-form-item> |
|
|
|
<el-input v-model="formobj.shelfLife" placeholder="规格" class="addinputw addinputInfo" clearable /> |
|
|
|
<el-input v-model="formobj.indexes" placeholder="规格" class="addinputw addinputInfo" clearable /> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
|
|
|
@ -117,7 +118,7 @@ |
|
|
|
<el-col :span="6"> |
|
|
|
<div class="span-sty">原厂标志</div> |
|
|
|
<el-form-item> |
|
|
|
<el-radio-group v-model="formobj.isListed" size="small" class="addinputw"> |
|
|
|
<el-radio-group v-model="formobj.isOriginalFactory" size="small" class="addinputw"> |
|
|
|
<el-radio :label="'1'">是</el-radio> |
|
|
|
<el-radio :label="'2'">否</el-radio> |
|
|
|
</el-radio-group> |
|
|
@ -139,7 +140,7 @@ |
|
|
|
<el-col :span="18"> |
|
|
|
<div class="span-sty">商品备注</div> |
|
|
|
<el-form-item> |
|
|
|
<el-input v-model="formobj.remarks" placeholder="商品备注" class="addinputw addinputInfo" clearable /> |
|
|
|
<el-input v-model="formobj.skuRemarks" placeholder="商品备注" class="addinputw addinputInfo" clearable /> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
|
|
|
@ -150,15 +151,15 @@ |
|
|
|
<el-col :span="16"> |
|
|
|
<div class="span-sty">库存上限</div> |
|
|
|
<el-form-item> |
|
|
|
<el-input v-model="formobj.externalCode" placeholder="库存上限" class="addinputw addinputInfo" clearable |
|
|
|
oninput="value=value.replace(/^(0+)|[^\d]+/g,'')" /> |
|
|
|
<el-input v-model="formobj.inventoryAlertUpperLimit" placeholder="库存上限" class="addinputw addinputInfo" |
|
|
|
clearable oninput="value=value.replace(/^(0+)|[^\d]+/g,'')" /> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
|
|
|
|
<el-col :span="18"> |
|
|
|
<div class="span-sty">库存下限</div> |
|
|
|
<el-form-item> |
|
|
|
<el-input v-model="formobj.nationalStandardCode" placeholder="库存下限" class="addinputw addinputInfo" |
|
|
|
<el-input v-model="formobj.inventoryAlertLowerLimit" placeholder="库存下限" class="addinputw addinputInfo" |
|
|
|
clearable oninput="value=value.replace(/^(0+)|[^\d]+/g,'')" /> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
@ -170,7 +171,7 @@ |
|
|
|
<el-col :span="6"> |
|
|
|
<div class="span-sty">锁定销售定价</div> |
|
|
|
<el-form-item> |
|
|
|
<el-radio-group v-model="itemInfo.isLockingSalesPrice" size="small" class="addinputw"> |
|
|
|
<el-radio-group v-model="formobj.isLockingSalesPrice" size="small" class="addinputw"> |
|
|
|
<el-radio :label="'1'">是</el-radio> |
|
|
|
<el-radio :label="'2'">否</el-radio> |
|
|
|
</el-radio-group> |
|
|
@ -180,8 +181,7 @@ |
|
|
|
<el-col :span="6"> |
|
|
|
<div class="span-sty">销售底价</div> |
|
|
|
<el-form-item> |
|
|
|
<el-input v-model="formobj.nationalStandardCode" placeholder="国标码" class="addinputw addinputInfo" |
|
|
|
clearable |
|
|
|
<el-input v-model="formobj.minimumSalesPrice" placeholder="销售底价" class="addinputw addinputInfo" clearable |
|
|
|
oninput="value=value.replace(/[^\d.]/g, '').replace(/\.{2,}/g, '.').replace('.', '$#$').replace(/\./g, '').replace('$#$', '.').replace(/^(\-)*(\d+)\.(\d\d).*$/, '$1$2.$3').replace(/^\./g, '')" /> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
@ -189,7 +189,8 @@ |
|
|
|
<el-col :span="6"> |
|
|
|
<div class="span-sty">三包价格</div> |
|
|
|
<el-form-item> |
|
|
|
<el-input v-model="formobj.externalCode" placeholder="外部编码" class="addinputw addinputInfo" clearable |
|
|
|
<el-input v-model="formobj.standardPurchasePrice" placeholder="三包价格" class="addinputw addinputInfo" |
|
|
|
clearable |
|
|
|
oninput="value=value.replace(/[^\d.]/g, '').replace(/\.{2,}/g, '.').replace('.', '$#$').replace(/\./g, '').replace('$#$', '.').replace(/^(\-)*(\d+)\.(\d\d).*$/, '$1$2.$3').replace(/^\./g, '')" /> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
@ -197,8 +198,7 @@ |
|
|
|
<el-col :span="6"> |
|
|
|
<div class="span-sty">首保价格</div> |
|
|
|
<el-form-item> |
|
|
|
<el-input v-model="formobj.nationalStandardCode" placeholder="国标码" class="addinputw addinputInfo" |
|
|
|
clearable |
|
|
|
<el-input v-model="formobj.agencyPrice" placeholder="首保价格" class="addinputw addinputInfo" clearable |
|
|
|
oninput="value=value.replace(/[^\d.]/g, '').replace(/\.{2,}/g, '.').replace('.', '$#$').replace(/\./g, '').replace('$#$', '.').replace(/^(\-)*(\d+)\.(\d\d).*$/, '$1$2.$3').replace(/^\./g, '')" /> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
@ -242,35 +242,40 @@ |
|
|
|
imgList: [], |
|
|
|
submitdisabled: false, |
|
|
|
formobj: { |
|
|
|
sid: '', |
|
|
|
goodsName: "", |
|
|
|
goodsCode: "", |
|
|
|
brandSid: "", |
|
|
|
brand: "", |
|
|
|
goodsTypeSid: "", |
|
|
|
typeName: "", |
|
|
|
manufacturersid: "", |
|
|
|
manufacturer: "", |
|
|
|
externalCode: '', |
|
|
|
factoryCode: '', |
|
|
|
taxRate: '', |
|
|
|
shelfLife: '', |
|
|
|
baseGoodsSpuDetail: { |
|
|
|
goodsExplain: "", |
|
|
|
goodsDescription: "" |
|
|
|
}, |
|
|
|
baseGoodsSkus: [] |
|
|
|
"sid": "", |
|
|
|
"userSid": window.sessionStorage.getItem('userSid'), |
|
|
|
"orgPath": window.sessionStorage.getItem('orgSidPath'), |
|
|
|
"goodsName": "", |
|
|
|
"goodsCode": "", |
|
|
|
"goodsPY": "", |
|
|
|
"barCode": "", |
|
|
|
"goodsUnitSid": "", |
|
|
|
"goodsUnitName": "", |
|
|
|
"goodsTypeSid": "", |
|
|
|
"goodsTypeName": "", |
|
|
|
"indexes": "", |
|
|
|
"shelfLife": "", |
|
|
|
"brandSid": "", |
|
|
|
"brandName": "", |
|
|
|
"manufacturerSid": "", |
|
|
|
"manufacturerName": "", |
|
|
|
"isOriginalFactory": "", |
|
|
|
"isOriginalFactoryValue": "", |
|
|
|
"sortNo": "", |
|
|
|
"skuRemarks": "", |
|
|
|
"inventoryAlertUpperLimit": "", |
|
|
|
"inventoryAlertLowerLimit": "", |
|
|
|
"isLockingSalesPrice": "", |
|
|
|
"isLockingSalesPriceValue": "", |
|
|
|
"minimumSalesPrice": "", |
|
|
|
"standardPurchasePrice": "", |
|
|
|
"agencyPrice": "", |
|
|
|
"picPath": [] |
|
|
|
}, |
|
|
|
brandList: [], |
|
|
|
cateList: [], |
|
|
|
facturerList: [], |
|
|
|
unitNameList: [], |
|
|
|
hideUploadBtn: false, |
|
|
|
dialogVisible: false, |
|
|
|
dialogVisible2: false, |
|
|
|
dialogVisible3: false, |
|
|
|
itemInfo: {}, |
|
|
|
orderInfo: {} |
|
|
|
} |
|
|
|
}, |
|
|
|
created() { |
|
|
@ -295,10 +300,8 @@ |
|
|
|
console.log('backData》》》》', value) |
|
|
|
console.log('imgList', this.imgList) |
|
|
|
|
|
|
|
this.itemInfo.urls = this.imgList |
|
|
|
this.formobj.picPath = this.imgList |
|
|
|
|
|
|
|
this.hideUploadBtn = this.imgList.length != 0 |
|
|
|
console.log('this.hideUploadBtn', this.hideUploadBtn) |
|
|
|
}, |
|
|
|
|
|
|
|
saveOrUpdate() { |
|
|
@ -320,36 +323,44 @@ |
|
|
|
}, |
|
|
|
handleReturn(isreload) { |
|
|
|
if (isreload === 'true') this.$emit('reloadlist') |
|
|
|
this.imgList = [] |
|
|
|
this.hideUploadBtn = true |
|
|
|
this.formobj = { |
|
|
|
sid: '', |
|
|
|
brand: "", |
|
|
|
brandSid: "", |
|
|
|
typeName: "", |
|
|
|
goodsTypeSid: "", |
|
|
|
manufacturer: "", |
|
|
|
manufacturerSid: "", |
|
|
|
goodsName: '', |
|
|
|
goodsCode: '', |
|
|
|
barcode: '', |
|
|
|
producer: '', |
|
|
|
unit: '', |
|
|
|
specification: '', |
|
|
|
remarks: '', |
|
|
|
baseGoodsSpuDetail: { |
|
|
|
goodsExplain: "", |
|
|
|
goodsDescription: "" |
|
|
|
}, |
|
|
|
baseGoodsSkus: [] |
|
|
|
"sid": "", |
|
|
|
"userSid": window.sessionStorage.getItem('userSid'), |
|
|
|
"orgPath": window.sessionStorage.getItem('orgSidPath'), |
|
|
|
"goodsName": "", |
|
|
|
"goodsCode": "", |
|
|
|
"goodsPY": "", |
|
|
|
"barCode": "", |
|
|
|
"goodsUnitSid": "", |
|
|
|
"goodsUnitName": "", |
|
|
|
"goodsTypeSid": "", |
|
|
|
"goodsTypeName": "", |
|
|
|
"indexes": "", |
|
|
|
"shelfLife": "", |
|
|
|
"brandSid": "", |
|
|
|
"brandName": "", |
|
|
|
"manufacturerSid": "", |
|
|
|
"manufacturerName": "", |
|
|
|
"isOriginalFactory": "", |
|
|
|
"isOriginalFactoryValue": "", |
|
|
|
"sortNo": "", |
|
|
|
"skuRemarks": "", |
|
|
|
"inventoryAlertUpperLimit": "", |
|
|
|
"inventoryAlertLowerLimit": "", |
|
|
|
"isLockingSalesPrice": "", |
|
|
|
"isLockingSalesPriceValue": "", |
|
|
|
"minimumSalesPrice": "", |
|
|
|
"standardPurchasePrice": "", |
|
|
|
"agencyPrice": "", |
|
|
|
"picPath": [] |
|
|
|
} |
|
|
|
this.$emit('doback') |
|
|
|
}, |
|
|
|
showAdd() { |
|
|
|
var sid = require('uuid').v1() |
|
|
|
console.log('>>>>>>>>>showAdd', sid) |
|
|
|
// var sid = require('uuid').v1() |
|
|
|
// console.log('>>>>>>>>>showAdd', sid) |
|
|
|
|
|
|
|
this.formobj.sid = sid |
|
|
|
// this.formobj.sid = sid |
|
|
|
}, |
|
|
|
indexMethod(index) { |
|
|
|
return index + 1 |
|
|
@ -375,7 +386,7 @@ |
|
|
|
const choose = this.cateList.filter((item) => item.sid == val) |
|
|
|
console.log('>>>>>>>>>selectCateChange', choose) |
|
|
|
this.formobj.goodsTypeSid = choose[0].sid |
|
|
|
this.formobj.typeName = choose[0].goodsTypeName |
|
|
|
this.formobj.goodsTypeName = choose[0].goodsTypeName |
|
|
|
}, |
|
|
|
selectfacturerChange(val) { |
|
|
|
const choose = this.facturerList.filter((item) => item.sid == val) |
|
|
@ -389,111 +400,6 @@ |
|
|
|
this.formobj.goodsUnitSid = choose[0].sid |
|
|
|
this.formobj.goodsUnitName = choose[0].unitName |
|
|
|
}, |
|
|
|
editGoodsSku(goodsSku) { |
|
|
|
console.log('>>>>>>>>>editGoodsSku', goodsSku) |
|
|
|
this.orderInfo = goodsSku |
|
|
|
this.dialogVisible3 = true |
|
|
|
}, |
|
|
|
|
|
|
|
showGoodsSkuDttail(goodsSkuDto) { |
|
|
|
console.log('>>>>>>>>>showGoodsSkuDttail', goodsSkuDto) |
|
|
|
|
|
|
|
this.dialogVisible = true |
|
|
|
this.itemInfo = goodsSkuDto |
|
|
|
}, |
|
|
|
|
|
|
|
editGoodsSkuDttail(goodsSkuDto) { |
|
|
|
console.log('>>>>>>>>>editGoodsSkuDttail', goodsSkuDto) |
|
|
|
|
|
|
|
this.dialogVisible2 = true |
|
|
|
this.itemInfo = goodsSkuDto |
|
|
|
this.imgList = goodsSkuDto.urls |
|
|
|
}, |
|
|
|
|
|
|
|
handleClose() { |
|
|
|
this.dialogVisible = false |
|
|
|
}, |
|
|
|
handleClose2() { |
|
|
|
this.dialogVisible2 = false |
|
|
|
}, |
|
|
|
handleClose3() { |
|
|
|
this.dialogVisible3 = false |
|
|
|
}, |
|
|
|
saveGoodsSku() { |
|
|
|
|
|
|
|
console.log('>>>>>>>>>saveGoodsSkuDttail', this.orderInfo) |
|
|
|
|
|
|
|
if (this.orderInfo.sid == '') { |
|
|
|
this.orderInfo.sid = require('uuid').v1() |
|
|
|
this.orderInfo.goodsSpuSid = this.formobj.sid |
|
|
|
this.orderInfo.isEnable = '1' |
|
|
|
var detail = { |
|
|
|
sid: require('uuid').v1(), |
|
|
|
isEnable: '1', |
|
|
|
goodsSkuSid: this.orderInfo.sid, |
|
|
|
finalPurchasePrice: "", |
|
|
|
safetyStockDays: "", |
|
|
|
isOriginalFactory: "", |
|
|
|
isInventoryAlert: "", |
|
|
|
inventoryAlertUpperLimit: "", |
|
|
|
inventoryAlertLowerLimit: "", |
|
|
|
costPrice: "", |
|
|
|
tagPrice: "", |
|
|
|
salesPrice: "", |
|
|
|
standardPurchasePrice: "", |
|
|
|
agencyPrice: "", |
|
|
|
discount: "", |
|
|
|
minimumSalesPrice: "", |
|
|
|
isLockingSalesPrice: "", |
|
|
|
isIntegralExchange: "", |
|
|
|
integralAmount: "", |
|
|
|
urls: [], |
|
|
|
} |
|
|
|
|
|
|
|
this.orderInfo.baseGoodsSkuExtend = detail |
|
|
|
|
|
|
|
this.formobj.baseGoodsSkus.push(this.orderInfo) |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
var index = this.formobj.baseGoodsSkus.findIndex((item) => item.sid == this.orderInfo.sid) |
|
|
|
|
|
|
|
if (index > -1) { |
|
|
|
|
|
|
|
this.formobj.baseGoodsSkus[index].goodsSkuCode = this.orderInfo.goodsSkuCode |
|
|
|
this.formobj.baseGoodsSkus[index].title = this.orderInfo.title |
|
|
|
this.formobj.baseGoodsSkus[index].externalCode = this.orderInfo.externalCode |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
this.dialogVisible3 = false |
|
|
|
}, |
|
|
|
saveGoodsSkuDttail() { |
|
|
|
|
|
|
|
this.itemInfo.urls = this.imgList |
|
|
|
|
|
|
|
console.log('>>>>>>>>>saveGoodsSkuDttail', this.itemInfo) |
|
|
|
|
|
|
|
var index = this.formobj.baseGoodsSkus.findIndex((item) => item.baseGoodsSkuExtend.sid == this.itemInfo.sid) |
|
|
|
|
|
|
|
console.log('>>>>>>>>>saveGoodsSkuDttail', index) |
|
|
|
|
|
|
|
this.formobj.baseGoodsSkus[index].baseGoodsSkuExtend = this.itemInfo |
|
|
|
|
|
|
|
console.log('>>>>>>>>>saveGoodsSkuDttail', this.formobj.baseGoodsSkus[index].baseGoodsSkuExtend) |
|
|
|
|
|
|
|
this.dialogVisible2 = false |
|
|
|
}, |
|
|
|
addGoodsSku() { |
|
|
|
this.dialogVisible3 = true |
|
|
|
this.orderInfo = { |
|
|
|
sid: '' |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|