Commit 92d62e15 authored by 我在何方's avatar 我在何方
parents 4bad0846 e1009d67
...@@ -5,7 +5,7 @@ ENV = 'production' ...@@ -5,7 +5,7 @@ ENV = 'production'
VUE_APP_TITLE = 捷道管理系统 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/' # PUBLIC_PATH = 'http://jd.admtest.jdshangmen.com/'
......
...@@ -71,6 +71,7 @@ export default { ...@@ -71,6 +71,7 @@ export default {
}else this.index = index }else this.index = index
}, },
onFocus(){ onFocus(){
this.$emit('focus')
if(!this.list.length){ if(!this.list.length){
this.remoteMethod() this.remoteMethod()
} }
......
...@@ -114,7 +114,12 @@ ...@@ -114,7 +114,12 @@
}" }"
class="mb-0 mr-0" 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> </el-form-item>
</template> </template>
</el-table-column> </el-table-column>
...@@ -123,7 +128,12 @@ ...@@ -123,7 +128,12 @@
{{$t('英文品名')}} <span class="red">*</span> {{$t('英文品名')}} <span class="red">*</span>
</template> </template>
<template slot-scope="scope"> <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> </template>
</el-table-column> </el-table-column>
<!-- <el-table-column label="商品类型" width="160px"> <!-- <el-table-column label="商品类型" width="160px">
...@@ -191,7 +201,7 @@ ...@@ -191,7 +201,7 @@
}" }"
class="mb-0 mr-0" 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> </el-form-item>
</template> </template>
</el-table-column> </el-table-column>
...@@ -915,8 +925,15 @@ export default { ...@@ -915,8 +925,15 @@ export default {
}, */ }, */
onProductChange(row, product){ onProductChange(row, product){
console.log(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.prodAttrArr = !product ? [] : product.attrId.split(',').filter(item => item !== '').map(item => +item)
} }
row.prodTitleEn = product.titleEn row.prodTitleEn = product.titleEn
......
...@@ -400,7 +400,7 @@ ...@@ -400,7 +400,7 @@
this.getList() this.getList()
} }
getCurrencyList().then(res => this.currencyList = res.data) getCurrencyList().then(res => this.currencyList = res.data)
}, },
watch:{ watch:{
'handlerParams.orderExceptionHandlerResult'(val){ 'handlerParams.orderExceptionHandlerResult'(val){
......
...@@ -561,11 +561,14 @@ export default { ...@@ -561,11 +561,14 @@ export default {
}, },
handleVolume(index, val){ handleVolume(index, val){
const {boxGauge1, boxGauge2, boxGauge3} = (val === 1 ? this.tableData1 : this.tableData)[index] const {boxGauge1, boxGauge2, boxGauge3} = (val === 1 ? this.tableData1 : this.tableData)[index]
let result = ''
if (boxGauge1 && boxGauge2 && boxGauge3) { 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 { } 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() { handleSubmit() {
const orderWarehouseInItemDoList = [ const orderWarehouseInItemDoList = [
......
...@@ -449,7 +449,7 @@ export default { ...@@ -449,7 +449,7 @@ export default {
this.form.attrArray = attrArray this.form.attrArray = attrArray
}) })
this.open = true; 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