Bläddra i källkod

Merge branch 'dev' into 'test'

Dev

See merge request quanshu/mp-ui-pc!187
hunagwb 3 år sedan
förälder
incheckning
76ed339cce

+ 8 - 2
src/views/business/goods/add.vue

@@ -102,6 +102,12 @@
             </el-input>
           </el-form-item>
         </el-col>
+        <el-col :span="23">
+          <el-form-item label="商品编码:" prop="goodsCode">
+            <el-input v-model="addData.goodsCode" type="number" placeholder="请输入商品编码">
+            </el-input>
+          </el-form-item>
+        </el-col>
         <el-col :span="23">
           <el-form-item label="库存:" prop="quantity">
             <el-input v-model="addData.quantity" type="number" placeholder="请输入商品库存">
@@ -212,11 +218,11 @@ export default {
     this.getGoodsTagItems()
     if (this.id) {
       getGoodsDetail(this.id).then(res => {
-        const { goodsId, title, picUrl,merchantInfo, exchangeShow, multiSku, value, exchangePrice, cost, quantity, description, skuList, categoryId, tagIds } = res.data
+        const { goodsId, title, goodsCode, picUrl,merchantInfo, exchangeShow, multiSku, value, exchangePrice, cost, quantity, description, skuList, categoryId, tagIds } = res.data
         this.addData = {
           value: accDiv(value, 100),
           cost: cost == '' || cost == null ? '' : accDiv(cost, 100),
-          goodsId, title, picUrl,merchantInfo, exchangeShow, multiSku, exchangePrice, quantity, description, skuList, categoryId, tagIds
+          goodsId, title, goodsCode, picUrl,merchantInfo, exchangeShow, multiSku, exchangePrice, quantity, description, skuList, categoryId, tagIds
         }
         if(description) {
           this.$refs.editor.setContent(description)

+ 8 - 0
src/views/business/goods/components/spec.vue

@@ -41,6 +41,7 @@
           <th rowspan="2" class="required"><span>*</span>价格(元)</th>
           <th rowspan="2" class="required"><span>*</span>兑换盲豆数量</th>
           <th rowspan="2">采购价格(元)</th>
+          <th rowspan="2">SKU编码</th>
           <th rowspan="2" class="required"><span>*</span>库存</th>
           <th rowspan="2">启用</th>
         </tr>
@@ -78,6 +79,11 @@
               <el-input v-model="sku.costY" />
             </el-form-item>
           </td>
+          <td class="pd">
+            <el-form-item :prop="`skuList.${index}.skuCode`">
+              <el-input v-model="sku.skuCode" />
+            </el-form-item>
+          </td>
           <td class="pd">
             <el-form-item :prop="`skuList.${index}.quantity`" :rules="{ required: true, message: '请输入库存', trigger: 'blur' }">
               <el-input-number v-model="sku.quantity" :min="0" @change="$event === 0 ? sku.status = false : sku.status = true" />
@@ -162,6 +168,7 @@ export default {
       this.specListTmp = JSON.parse(JSON.stringify(this.specList))
       this.skuList = sku.map(item => {
         this.$set(item, 'valueY', accDiv(item.value, 100))
+        this.$set(item, 'skuCode', accDiv(item.skuCode, 1))
         this.$set(item, 'exchange', accDiv(item.exchangePrice,1))
         this.$set(item, 'costY', item.cost == null ? '' : accDiv(item.cost, 100) )
         this.$set(item, 'picUrlArr', item.picUrl.split(',').map(item => { return { fileName: item }}))
@@ -258,6 +265,7 @@ export default {
           picUrlArr: [],
           valueY: 0.00,
           costY: '',
+          skuCode:'',
           quantity: 0,
           status: true,
           properties

+ 0 - 1
src/views/order/channel/index.vue

@@ -405,7 +405,6 @@ export default {
         cancelButtonText: '取消',
         type: 'warning'
       }).then(() => {
-        console.log(row)
         let data = {
           orderId:row.orderId
         }