Commit 92d62e15 authored by 我在何方's avatar 我在何方
parents 4bad0846 e1009d67
......@@ -5,7 +5,7 @@ ENV = 'production'
VUE_APP_TITLE = 捷道管理系统
# 捷道管理系统/生产环境
VUE_APP_BASE_API = 'http://api2.groupage.cn'
VUE_APP_BASE_API = 'https://api2.groupage.cn'
# 根据服务器或域名修改
# PUBLIC_PATH = 'http://jd.admtest.jdshangmen.com/'
......
......@@ -71,6 +71,7 @@ export default {
}else this.index = index
},
onFocus(){
this.$emit('focus')
if(!this.list.length){
this.remoteMethod()
}
......
......@@ -114,7 +114,12 @@
}"
class="mb-0 mr-0"
>
<product-selector v-model="scope.row.prodId" @change="onProductChange(scope.row, $event)" :disabled="!canAddProduct || !productEditable" />
<product-selector
v-model="scope.row.prodId"
@change="onProductChange(scope.row, $event)"
:disabled="!canAddProduct || !productEditable"
@focus="scope.row.updated = true"
/>
</el-form-item>
</template>
</el-table-column>
......@@ -123,7 +128,12 @@
{{$t('英文品名')}} <span class="red">*</span>
</template>
<template slot-scope="scope">
<product-selector lang="En" v-model="scope.row.prodId" @change="onProductChange(scope.row, $event)" :disabled="!canAddProduct || !productEditable" />
<product-selector
lang="En"
v-model="scope.row.prodId"
@change="onProductChange(scope.row, $event)"
@focus="scope.row.updated = true"
:disabled="!canAddProduct || !productEditable" />
</template>
</el-table-column>
<!-- <el-table-column label="商品类型" width="160px">
......@@ -191,7 +201,7 @@
}"
class="mb-0 mr-0"
>
<el-input v-model="scope.row.worth" :disabled="!canAddProduct" @input="calculationPrice" />
<el-input v-model="scope.row.worth" :disabled="!canAddProduct" @input="calculationPrice" type="number" />
</el-form-item>
</template>
</el-table-column>
......@@ -915,8 +925,15 @@ export default {
}, */
onProductChange(row, product){
console.log(product)
// row.goodsType = product ? product.typeId : null
if(product.id != row.prodId){
// 如果是清除商品
if(!product){
row.fee = null
row.prodAttrArr = []
return false
}
// 没有orderItemId则表示新增的,否则就是编辑回显的
// row.updated 表示用户操作了,用来区分是自动回显还是用户选择商品
if(!row.orderItemId || row.updated){
row.prodAttrArr = !product ? [] : product.attrId.split(',').filter(item => item !== '').map(item => +item)
}
row.prodTitleEn = product.titleEn
......
......@@ -400,7 +400,7 @@
this.getList()
}
getCurrencyList().then(res => this.currencyList = res.data)
getCurrencyList().then(res => this.currencyList = res.data)
},
watch:{
'handlerParams.orderExceptionHandlerResult'(val){
......
......@@ -561,11 +561,14 @@ export default {
},
handleVolume(index, val){
const {boxGauge1, boxGauge2, boxGauge3} = (val === 1 ? this.tableData1 : this.tableData)[index]
let result = ''
if (boxGauge1 && boxGauge2 && boxGauge3) {
(val === 1 ? this.tableData1 : this.tableData)[index].volume = ((boxGauge1 * boxGauge2 * boxGauge3) / 1000000)?.toFixed(2) || ''
result = ((boxGauge1 * boxGauge2 * boxGauge3) / 1000000)?.toFixed(2) || ''
} else {
(val === 1 ? this.tableData1 : this.tableData)[index].volume = 0
result = ''
}
if (result === '0.00') result = '0.01';
(val === 1 ? this.tableData1 : this.tableData)[index].volume = result
},
handleSubmit() {
const orderWarehouseInItemDoList = [
......
......@@ -449,7 +449,7 @@ export default {
this.form.attrArray = attrArray
})
this.open = true;
this.title = this.$t("修改商品1");
this.title = this.$t("修改商品");
});
},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment