Commit e1009d67 authored by dragondean@qq.com's avatar dragondean@qq.com

修复编辑订单带不出特性

parent 7ae4397a
......@@ -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
......
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