|
@@ -126,7 +126,7 @@ export default {
|
|
|
{ pattern: /^([1-9]\d*(\.\d{1,2})?|([0](\.([0][1-9]|[1-9]\d{0,1}))))$/, message: "请输入正确的金额,最多两位小数", trigger: ["blur", "change"] }],
|
|
|
exchangeRules: [
|
|
|
{ required: true,message:'请输入盲豆数量', trigger: 'blur' },
|
|
|
- { pattern: /^([1-9]\d*)$/, message: "请输入正确的数字", trigger: ["blur", "change"] }
|
|
|
+ { pattern: /^([1-9]\d*)$/, message: "请输入正确的盲豆数量", trigger: ["blur", "change"] }
|
|
|
]
|
|
|
}
|
|
|
},
|
|
@@ -162,6 +162,7 @@ export default {
|
|
|
this.specListTmp = JSON.parse(JSON.stringify(this.specList))
|
|
|
this.skuList = sku.map(item => {
|
|
|
this.$set(item, 'valueY', accDiv(item.value, 100))
|
|
|
+ this.$set(item, 'exchange', accDiv(item.exchangePrice,1))
|
|
|
this.$set(item, 'costY', item.cost == null ? '' : accDiv(item.cost, 100) )
|
|
|
this.$set(item, 'picUrlArr', item.picUrl.split(',').map(item => { return { fileName: item }}))
|
|
|
this.$set(item, 'status', !!item.quantity)
|
|
@@ -292,9 +293,9 @@ export default {
|
|
|
this.$refs.sku.validate((valid, items) => {
|
|
|
if (valid) {
|
|
|
this.skuList.forEach(item => {
|
|
|
- const { valueY, costY } = item
|
|
|
+ const { valueY,exchange, costY } = item
|
|
|
item.value = accMul(valueY, 100)
|
|
|
- item.exchangePrice = accDiv(item.value, 10)
|
|
|
+ item.exchangePrice = accMul(exchange, 1)
|
|
|
item.cost = costY == '' ? '' : accMul(costY, 100)
|
|
|
item.picUrl = item.picUrlArr.map(item => { return item.fileName }).toString()
|
|
|
})
|