|
@@ -143,19 +143,63 @@
|
|
|
placeholder="请输入大于100的数字(最多允许两位小数)"></a-input-number>
|
|
|
</a-form-model-item>
|
|
|
</a-col>
|
|
|
- <a-col :span="24">
|
|
|
- <a-form-model-item label="价格显示" :labelCol="{span: 3}">
|
|
|
- <a-checkbox-group @change="onChangePriceType">
|
|
|
- <a-checkbox value="A">
|
|
|
- 车主价(修理厂的建议销售价)
|
|
|
- </a-checkbox>
|
|
|
- <a-checkbox value="B">
|
|
|
- 进货价(修理厂的进货价,即汽配商的销售价)
|
|
|
- </a-checkbox>
|
|
|
- </a-checkbox-group>
|
|
|
- <span v-show="val!=''">
|
|
|
- <a-switch checked-children="是" default-checked un-checked-children="否" v-model="form.showPrice" size="small"/><span class="switchSpan">非铺货产品显示价格</span>
|
|
|
- </span>
|
|
|
+ <a-col :span="12" v-for="(con, index) in priceList" :key="index" v-if="priceList.length>0">
|
|
|
+ <a-form-model-item :prop="form[con.paramCode]" v-if="con.paramCode == 'shelf_price_show'">
|
|
|
+ <template slot="label">
|
|
|
+ <a-tooltip placement="top">
|
|
|
+ <template slot="title">
|
|
|
+ 修理厂登录修配易码通小程序后,
|
|
|
+ <br />
|
|
|
+ 是否可以看见产品的车主价
|
|
|
+ </template>
|
|
|
+ 车主价
|
|
|
+ <a-icon type="question-circle" style="color: rgba(0,0,0,.65);font-size: 16px;margin-left: 2px;vertical-align: sub;cursor: pointer;" />
|
|
|
+ </a-tooltip>
|
|
|
+ </template>
|
|
|
+ <a-radio-group @change="(e)=>onChangePriceType(e,index)" v-model="con.paramValue">
|
|
|
+ <a-radio value="1">可见</a-radio>
|
|
|
+ <a-radio value="0">不可见</a-radio>
|
|
|
+ </a-radio-group>
|
|
|
+ <span class="spanStyle">(修理厂的建议销售价)</span>
|
|
|
+ </a-form-model-item>
|
|
|
+ <a-form-model-item :prop="form[con.paramCode]" v-if="con.paramCode == 'shelf_cost_show'">
|
|
|
+ <template slot="label">
|
|
|
+ <a-tooltip placement="top">
|
|
|
+ <template slot="title">
|
|
|
+ 修理厂登录修配易码通小程序后,<br>
|
|
|
+ 是否可以看见产品的进货价
|
|
|
+ </template>
|
|
|
+ 进货价<a-icon type="question-circle" style="color: rgba(0,0,0,.65);font-size: 16px;margin-left: 2px;vertical-align: sub;cursor: pointer;" />
|
|
|
+ </a-tooltip>
|
|
|
+ </template>
|
|
|
+ <a-radio-group @change="(e)=>onChangePriceType(e,index)" v-model="con.paramValue">
|
|
|
+ <a-radio value="1">
|
|
|
+ 可见
|
|
|
+ </a-radio>
|
|
|
+ <a-radio value="0">
|
|
|
+ 不可见
|
|
|
+ </a-radio>
|
|
|
+ </a-radio-group>
|
|
|
+ <span class="spanStyle">(修理厂的进货价,即汽配商的销售价)</span>
|
|
|
+ </a-form-model-item>
|
|
|
+ <a-form-model-item :prop="form[con.paramCode]" v-if="flag && con.paramCode == 'shelf_not_distribute_show'">
|
|
|
+ <template slot="label">
|
|
|
+ <a-tooltip placement="top">
|
|
|
+ <template slot="title">
|
|
|
+ 非铺货产品指不是货架上的产品
|
|
|
+ </template>
|
|
|
+ 非铺货产品价格<a-icon type="question-circle" style="color: rgba(0,0,0,.65);font-size: 16px;margin-left: 2px;vertical-align: sub;cursor: pointer;" />
|
|
|
+ </a-tooltip>
|
|
|
+ </template>
|
|
|
+ <a-radio-group @change="(e)=>onChangePriceType(e,index)" v-model="con.paramValue">
|
|
|
+ <a-radio value="1">
|
|
|
+ 显示
|
|
|
+ </a-radio>
|
|
|
+ <a-radio value="0">
|
|
|
+ 不显示
|
|
|
+ </a-radio>
|
|
|
+ </a-radio-group>
|
|
|
+ <span class="spanStyle">(非铺货产品是否显示车主价和进货价)</span>
|
|
|
</a-form-model-item>
|
|
|
</a-col>
|
|
|
</a-row>
|
|
@@ -173,7 +217,7 @@ import { STable, VSelect, Upload } from '@/components'
|
|
|
import { getAreaCgj } from '@/api/data'
|
|
|
import dealerList from '@/views/common/dealerList.vue'
|
|
|
import customeList from '@/views/common/customeList.vue'
|
|
|
-import { xprhStoreApplyDetail, xprhStoreApplyAudit } from '@/api/approveStore'
|
|
|
+import { xprhStoreApplyDetail, xprhStoreApplyAudit, queryList, updateBatch } from '@/api/approveStore'
|
|
|
export default {
|
|
|
name: 'ApproveStoreAuthPass',
|
|
|
components: { STable, VSelect, dealerList, customeList, Upload },
|
|
@@ -202,7 +246,10 @@ export default {
|
|
|
creditLimit: undefined, // 授信额度
|
|
|
delearSn: undefined,
|
|
|
applySn: undefined,
|
|
|
- auditStatus: 'PASS' // 通过
|
|
|
+ auditStatus: 'PASS', // 通过
|
|
|
+ shelf_price_show: null,
|
|
|
+ shelf_cost_show: null,
|
|
|
+ shelf_not_distribute_show: null
|
|
|
},
|
|
|
rules: {
|
|
|
storeImage: [{ required: true, message: '请上传门头照片', trigger: 'change' }],
|
|
@@ -215,13 +262,18 @@ export default {
|
|
|
settleType: [{ required: true, message: '请选择收结算方式', trigger: 'change' }],
|
|
|
delearSn: [{ required: true, message: '请选择绑定汽配商', trigger: 'change' }],
|
|
|
customerSn: [{ required: true, message: '请选择关联客户', trigger: 'change' }],
|
|
|
- creditLimit: [{ required: true, message: '请输入授信额度', trigger: 'change' }]
|
|
|
+ creditLimit: [{ required: true, message: '请输入授信额度', trigger: 'change' }],
|
|
|
+ shelf_price_show: [{ required: true, message: '请选择车主价权限', trigger: 'change' }],
|
|
|
+ shelf_cost_show: [{ required: true, message: '请选择进货价权限', trigger: 'change' }],
|
|
|
+ shelf_not_distribute_show: [{ required: true, message: '请非铺货价格显示', trigger: 'change' }]
|
|
|
},
|
|
|
addrProvinceList: [], // 省下拉
|
|
|
addrCityList: [], // 市下拉
|
|
|
addrDistrictList: [], // 区下拉
|
|
|
settleStyleList: [], // 收款方式 下拉数据
|
|
|
- val: ''
|
|
|
+ val: '',
|
|
|
+ priceList: [],
|
|
|
+ flag: false
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
@@ -282,7 +334,7 @@ export default {
|
|
|
centered: true,
|
|
|
closable: true,
|
|
|
onOk () {
|
|
|
- _this.handleSubmit()
|
|
|
+ _this.handleSubit()
|
|
|
}
|
|
|
})
|
|
|
} else {
|
|
@@ -296,8 +348,7 @@ export default {
|
|
|
xprhStoreApplyAudit(_this.form).then(res => {
|
|
|
if (res.status == 200) {
|
|
|
_this.$message.success(res.message)
|
|
|
- _this.handleBack()
|
|
|
- _this.spinning = false
|
|
|
+ _this.updateBatch()
|
|
|
} else {
|
|
|
_this.spinning = false
|
|
|
}
|
|
@@ -380,13 +431,59 @@ export default {
|
|
|
this.getDetail()
|
|
|
}
|
|
|
},
|
|
|
- onChangePriceType (val) {
|
|
|
- this.val = val
|
|
|
+ getPriceList () {
|
|
|
+ // this.$route.params.sn
|
|
|
+ queryList({ shelfSn: '457619665555755008', bizType: 'xprh_shelf_price_show' }).then(res => {
|
|
|
+ if (res.status == 200) {
|
|
|
+ this.priceList = res.data
|
|
|
+ const isFlag = res.data.findIndex(r => {
|
|
|
+ return r.paramValue == 1
|
|
|
+ })
|
|
|
+ if (isFlag != -1) {
|
|
|
+ this.flag = true
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ onChangePriceType (e, i) {
|
|
|
+ this.$set(this.priceList[i], 'paramValue', e.target.value)
|
|
|
+ this.form[this.priceList[i].paramCode] = i.toString()
|
|
|
+ if (this.priceList[i].paramCode != 'xprh_shelf_price_show') {
|
|
|
+ const isFlag = this.priceList.findIndex(r => {
|
|
|
+ return r.paramValue == 1
|
|
|
+ })
|
|
|
+ if (isFlag != -1) {
|
|
|
+ this.flag = true
|
|
|
+ } else {
|
|
|
+ this.flag = false
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ handleSave () {
|
|
|
+ const _this = this
|
|
|
+ var newArr = []
|
|
|
+ for (var i = 0; i < this.priceList.length; i++) {
|
|
|
+ var obj = {
|
|
|
+ id: _this.priceList[i].id,
|
|
|
+ paramValue: _this.priceList[i].paramValue
|
|
|
+ }
|
|
|
+ newArr.push(obj)
|
|
|
+ }
|
|
|
+ updateBatch(newArr).then(ret => {
|
|
|
+ if (ret.status == 200) {
|
|
|
+ _this.$message.success(ret.message)
|
|
|
+ _this.handleBack()
|
|
|
+ _this.spinning = false
|
|
|
+ } else {
|
|
|
+ _this.spinning = false
|
|
|
+ }
|
|
|
+ })
|
|
|
}
|
|
|
},
|
|
|
mounted () {
|
|
|
if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
|
|
|
this.initPage()
|
|
|
+ this.getPriceList()
|
|
|
}
|
|
|
},
|
|
|
activated () {
|