Browse Source

2024.07.15
- 商品管理页增加配送属性字段传参;

zweiqin 8 months ago
parent
commit
f049dbbd7b

+ 11 - 1
src/views/commodity/commoditySystem/addCommodity.vue

@@ -85,11 +85,18 @@
               <el-input v-model.trim="form.productMarque" placeholder="请输入商品型号" />
             </el-form-item>
             <el-form-item label="需要物流" prop="ifLogistics">
-              <el-radio-group v-model="form.ifLogistics">
+              <el-radio-group v-model="form.ifLogistics" @input="form.distribution = ''">
                 <el-radio :label="1">是</el-radio>
                 <el-radio :label="0">否</el-radio>
               </el-radio-group>
             </el-form-item>
+            <el-form-item label="配送属性" prop="distribution">
+              <el-select v-model="form.distribution" size="mini" placeholder="请选择配送属性">
+                <el-option v-if="form.ifLogistics !== 1" label="线下核销" :value="1" />
+                <el-option v-if="form.ifLogistics !== 0" label="快递" :value="2" />
+                <el-option label="支付即核销" :value="3" />
+              </el-select>
+            </el-form-item>
             <el-form-item label="上架状态" prop="shelveState">
               <el-radio-group v-model="form.shelveState">
                 <el-radio :label="1">上架</el-radio>
@@ -208,6 +215,7 @@ export default {
         productMarque: '', // 商品型号
         supplierName: '', // 供应商名称
         ifLogistics: '', // 是否需要物流 1-是 0-否
+        distribution: '', // 配送属性。1线下核销,2快递,3支付即核销
         shelveState: '', // 是否上架 1-上架 0-不上架
         ifOversold: '', // 是否允许超卖 1-是 0-否
         ifCredit: '', // 是否支持积分兑换 1-是 0-否
@@ -317,6 +325,7 @@ export default {
         shopGroupId: [ { required: true, message: '请选择商品分组', trigger: 'change' } ],
         classifyId: [ { required: true, message: '请选择商品分类', trigger: 'change' } ],
         ifLogistics: [ { required: true, message: '请选择是否需要物流', trigger: 'change' } ],
+        distribution: [ { required: true, message: '请选择配送属性' } ],
         shelveState: [ { required: true, message: '请选择是否上架', trigger: 'change' } ],
         ifOversold: [ { required: true, message: '请选择是否允许超卖', trigger: 'change' } ],
         ifCredit: [ { required: true, message: '请选择是否支持积分兑换', trigger: 'change' } ],
@@ -416,6 +425,7 @@ export default {
         classifyId: '',
         supplierName: '',
         ifLogistics: '',
+        distribution: '',
         shelveState: ' ',
         ifOversold: '',
         ifCredit: '',

+ 7 - 0
src/views/selectionCenter/productSelectionList/components/DetailModal.vue

@@ -32,6 +32,12 @@
         <span v-else-if="(formData.ifLogistics === 0) || (formData.ifLogistics === null)">否</span>
         <span v-else>--</span>
       </el-form-item>
+      <el-form-item label="配送属性" prop="distribution">
+        <span v-if="formData.distribution === 1">线下核销</span>
+        <span v-else-if="formData.distribution === 2">快递</span>
+        <span v-else-if="formData.distribution === 3">支付即核销</span>
+        <span v-else>--</span>
+      </el-form-item>
       <el-form-item label="是否允许超卖" prop="ifOversold">
         <span v-if="formData.ifOversold">是</span>
         <span v-else-if="(formData.ifOversold === 0) || (formData.ifOversold === null)">否</span>
@@ -153,6 +159,7 @@ export default {
         supplierId: '',
         supplierName: '',
         ifLogistics: '',
+        distribution: '',
         sortId: '',
         shelveState: '',
         ifOversold: '',