|
@@ -27,7 +27,7 @@
|
|
|
</a-radio-group>
|
|
|
<span v-else>没有可选择的供应商</span>
|
|
|
</a-form-model-item>
|
|
|
- <a-form-model-item label="产品类型" prop="orderType">
|
|
|
+ <a-form-model-item label="产品类型" prop="orderType" v-if="systemFlag==1">
|
|
|
<v-select
|
|
|
code="ORDER_TYPE"
|
|
|
id="purchaseOrder-basicInfo-orderType"
|
|
@@ -68,6 +68,8 @@ import { VSelect } from '@/components'
|
|
|
import chooseAddressModal from '@/views/common/receivingAddress/chooseAddressModal.vue'
|
|
|
import { shippingAddressQuery } from '@/api/shippingAddress'
|
|
|
import { purchaseSave, purchaseTargetList } from '@/api/purchase'
|
|
|
+import { getParamValue } from '@/api/data'
|
|
|
+
|
|
|
export default {
|
|
|
name: 'BasicInfoModal',
|
|
|
components: { VSelect, chooseAddressModal },
|
|
@@ -117,7 +119,8 @@ export default {
|
|
|
chooseAddr: '', // 当前已选地址信息
|
|
|
addressId: undefined, // 地址id
|
|
|
openAddrModal: false, // 选择地址弹框是否显示
|
|
|
- notShowIn: []// 产品类型不显示
|
|
|
+ notShowIn: [], // 产品类型不显示
|
|
|
+ systemFlag: null// 产品类型显示不显示
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
@@ -145,13 +148,15 @@ export default {
|
|
|
this.form.purchaseTargetType = this.purchaseTragetType[ind].purchaseTargetType
|
|
|
this.form.purchaseTargetName = this.purchaseTragetType[ind].purchaseTargetName
|
|
|
}
|
|
|
- // 经销商向“上级”或“省仓”采购时,默认勾选“非轮胎产品”,不显示轮胎产品
|
|
|
- if (this.form.purchaseTargetType != 'SUPPLIER_SYS') {
|
|
|
- this.notShowIn = ['TIRE']
|
|
|
- } else {
|
|
|
- this.notShowIn = []
|
|
|
+ if (this.systemFlag == 1) {
|
|
|
+ // 经销商向“上级”或“省仓”采购时,默认勾选“非轮胎产品”,不显示轮胎产品
|
|
|
+ if (this.form.purchaseTargetType != 'SUPPLIER_SYS') {
|
|
|
+ this.notShowIn = ['TIRE']
|
|
|
+ } else {
|
|
|
+ this.notShowIn = []
|
|
|
+ }
|
|
|
+ this.form.orderType = 'OTHER'
|
|
|
}
|
|
|
- this.form.orderType = 'OTHER'
|
|
|
},
|
|
|
// 保存
|
|
|
handleSubmit (e) {
|
|
@@ -229,21 +234,34 @@ export default {
|
|
|
}
|
|
|
return item
|
|
|
})
|
|
|
- this.form.purchaseTargetSn = purchaseList[0].purchaseTargetSn
|
|
|
- this.form.purchaseTargetName = purchaseList[0].purchaseTargetName
|
|
|
- this.form.purchaseTargetType = purchaseList[0].purchaseTargetType
|
|
|
- if (purchaseList[0].purchaseTargetType != 'SUPPLIER_SYS') {
|
|
|
- this.notShowIn = ['TIRE']
|
|
|
- } else {
|
|
|
- this.notShowIn = []
|
|
|
+ if (this.systemFlag == 1) {
|
|
|
+ this.form.purchaseTargetSn = purchaseList[0].purchaseTargetSn
|
|
|
+ this.form.purchaseTargetName = purchaseList[0].purchaseTargetName
|
|
|
+ this.form.purchaseTargetType = purchaseList[0].purchaseTargetType
|
|
|
+ if (purchaseList[0].purchaseTargetType != 'SUPPLIER_SYS') {
|
|
|
+ this.notShowIn = ['TIRE']
|
|
|
+ } else {
|
|
|
+ this.notShowIn = []
|
|
|
+ }
|
|
|
+ this.form.orderType = 'OTHER'
|
|
|
}
|
|
|
- this.form.orderType = 'OTHER'
|
|
|
this.purchaseTragetType = purchaseList
|
|
|
} else {
|
|
|
this.purchaseTragetType = []
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
+ // 获取系统参数 判断是否显示产品类型
|
|
|
+ getSystemInfo () {
|
|
|
+ getParamValue({ code: 'TIRE_OPEN' }).then(res => {
|
|
|
+ if (res.status == 200) {
|
|
|
+ this.systemFlag = res.data
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.getParentDealer()
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
// 获取默认地址
|
|
|
getDefaultAddress () {
|
|
|
shippingAddressQuery({ defaultFlag: 1 }).then(res => {
|
|
@@ -291,8 +309,8 @@ export default {
|
|
|
this.$emit('close')
|
|
|
this.resetForm()
|
|
|
} else {
|
|
|
- this.getParentDealer()
|
|
|
this.getDefaultAddress()
|
|
|
+ this.getSystemInfo()
|
|
|
}
|
|
|
}
|
|
|
}
|