|
|
@@ -117,6 +117,11 @@
|
|
|
</el-tag>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
+ <el-table-column label="配送方式" align="center" prop="shippingType" width="100">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ {{ getShippingTypeText(scope.row.shippingType) }}
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
<el-table-column label="状态" align="center" prop="isShow">
|
|
|
<template slot-scope="scope">
|
|
|
<el-tag :type="getStatusType(scope.row)">
|
|
|
@@ -375,6 +380,23 @@
|
|
|
/>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
+ <el-form-item label="配送方式" prop="shippingType">
|
|
|
+ <el-radio-group v-model="form.shippingType" @change="handleShippingTypeChange">
|
|
|
+ <el-radio :label="1">自提</el-radio>
|
|
|
+ <el-radio :label="2">物流</el-radio>
|
|
|
+ </el-radio-group>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item
|
|
|
+ v-if="form.shippingType === 1"
|
|
|
+ label="是否允许销售退款"
|
|
|
+ prop="isAllowSalesRefund"
|
|
|
+ label-width="140px"
|
|
|
+ >
|
|
|
+ <el-radio-group v-model="form.isAllowSalesRefund">
|
|
|
+ <el-radio :label="1">是</el-radio>
|
|
|
+ <el-radio :label="0">否</el-radio>
|
|
|
+ </el-radio-group>
|
|
|
+ </el-form-item>
|
|
|
</el-form>
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
|
|
@@ -524,6 +546,22 @@ export default {
|
|
|
}
|
|
|
return statusMap[row.isShow] || 'info'
|
|
|
},
|
|
|
+ getShippingTypeText(shippingType) {
|
|
|
+ const map = {
|
|
|
+ 1: '自提',
|
|
|
+ 2: '物流'
|
|
|
+ }
|
|
|
+ return map[shippingType] || '-'
|
|
|
+ },
|
|
|
+ handleShippingTypeChange(value) {
|
|
|
+ if (value === 1) {
|
|
|
+ if (this.form.isAllowSalesRefund == null) {
|
|
|
+ this.form.isAllowSalesRefund = 1
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ this.form.isAllowSalesRefund = null
|
|
|
+ }
|
|
|
+ },
|
|
|
handleFullScreen() {
|
|
|
this.isFullscreen = !this.isFullscreen
|
|
|
},
|
|
|
@@ -601,6 +639,8 @@ export default {
|
|
|
drugImage: null,
|
|
|
purchaseLimit: null,
|
|
|
userTempId: null,
|
|
|
+ shippingType: 1,
|
|
|
+ isAllowSalesRefund: 1,
|
|
|
tuiCateId: null
|
|
|
}
|
|
|
this.drugImageArr = []
|
|
|
@@ -669,6 +709,10 @@ export default {
|
|
|
this.form.userTempId = response.data.userTempId != null
|
|
|
? response.data.userTempId
|
|
|
: (response.data.user_temp_id != null ? response.data.user_temp_id : null)
|
|
|
+ this.form.shippingType = response.data.shippingType != null ? Number(response.data.shippingType) : 1
|
|
|
+ this.form.isAllowSalesRefund = this.form.shippingType === 1
|
|
|
+ ? (response.data.isAllowSalesRefund != null ? Number(response.data.isAllowSalesRefund) : 1)
|
|
|
+ : null
|
|
|
this.form.isDrug = response.data.isDrug === 0 ? '0' : (response.data.isDrug ? response.data.isDrug.toString() : '0')
|
|
|
if (this.form.drugImage != null) {
|
|
|
this.drugImageArr = this.form.drugImage.split(',')
|
|
|
@@ -712,6 +756,9 @@ export default {
|
|
|
const params = { ...this.form }
|
|
|
params.user_temp_id = this.form.userTempId
|
|
|
delete params.userTempId
|
|
|
+ if (params.shippingType !== 1) {
|
|
|
+ params.isAllowSalesRefund = null
|
|
|
+ }
|
|
|
if (params.companyIds != null && params.companyIds.length) {
|
|
|
params.companyIds = params.companyIds.join(',')
|
|
|
}
|