chenrui 2 tahun lalu
induk
melakukan
6ae5f5dcf8

+ 14 - 1
src/views/productManagement/productInfo/edit.vue

@@ -121,7 +121,20 @@
               style="width: 90%;margin-right: 5px;"
               placeholder="请输入经销批发价(1~999999)"
               ref="specialPrice"
-              @keydown.enter.native="nextFocus('specialPrice', 'terminalPrice', $event)"
+              @keydown.enter.native="nextFocus('specialPrice', 'cost', $event)"
+              allowClear /><span>元</span>
+          </a-form-model-item>
+          <a-form-model-item label="成本价" v-if="pageType=='pages'" prop="cost">
+            <a-input-number
+              id="productInfoEdit-cost"
+              v-model="form.cost"
+              :min="0"
+              :max="999999"
+              :precision="2"
+              style="width: 90%;margin-right: 5px;"
+              placeholder="请输入成本价(1~999999)"
+              ref="cost"
+              @keydown.enter.native="nextFocus('cost', 'terminalPrice', $event)"
               allowClear /><span>元</span>
           </a-form-model-item>
           <a-form-model-item label="终端价" prop="terminalPrice">

+ 10 - 1
src/views/productManagement/productInfo/list.vue

@@ -218,6 +218,15 @@ export default {
             return text || text == 0 ? _this.toThousands(text, 2) : '--'
           }
         },
+        {
+          title: '成本价',
+          dataIndex: 'specialPrice',
+          width: '7%',
+          align: 'right',
+          customRender: function (text) {
+            return text || text == 0 ? _this.toThousands(text, 2) : '--'
+          }
+        },
         {
           title: '终端价',
           dataIndex: 'terminalPrice',
@@ -358,7 +367,7 @@ export default {
     changeStatus (record) {
       this.$confirm({
         title: '提示',
-        content: record.enabledFlag == '1' ? '产品被禁用后,不能再销售,确定禁用吗?' : '确定启用吗?',
+        content: record.enabledFlag == '1' ? '当前产品存在可用库存,产品被禁用后,不能再销售,确定禁用吗?' : '确定启用吗?',
         centered: true,
         onOk: () => {
           this.setEnable(record.enabledFlag == 1 ? '0' : '1', [record.productSn])