Browse Source

Merge branch 'develop_yh12' of http://git.chelingzhu.com/jianguan-web/jg-ocs-html into develop_yh12

chenrui 2 years ago
parent
commit
7b64b6aeeb

+ 9 - 6
src/views/purchasingManagement/bulkWarehousingOrder/auditNoPassModal.vue

@@ -32,12 +32,12 @@
 
 <script>
 export default {
-  name: 'auditNoPassModal',
+  name: 'AuditNoPassModal',
   props: {
     openModal: { //  弹框显示状态
       type: Boolean,
       default: false
-    },
+    }
   },
   data () {
     return {
@@ -50,7 +50,7 @@ export default {
       const arr = [
         { title: '序号', dataIndex: 'no', width: '5%', align: 'center' },
         { title: '产品编码', dataIndex: 'productCode', width: '25%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '产品名称', dataIndex: 'productName', width: '40%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '产品名称', dataIndex: 'productName', width: '40%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true }
       ]
       if (this.$hasPermissions('B_isShowCost')) { //  成本价权限
         arr.splice(5, 0, { title: 'OCS成本价', dataIndex: 'verifyCost', width: '15%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
@@ -64,8 +64,11 @@ export default {
     handleBack () {
       this.isShow = false
     },
-    setData(data){
+    setData (data) {
       this.list = data
+      this.list.map((item, i) => {
+        item.no = i + 1
+      })
     }
   },
   watch: {
@@ -78,7 +81,7 @@ export default {
       if (!newValue) {
         this.$emit('close')
       }
-    },
+    }
   }
 }
 </script>
@@ -93,4 +96,4 @@ export default {
       margin: 5px 0 10px;
     }
   }
-</style>
+</style>

+ 5 - 3
src/views/purchasingManagement/bulkWarehousingOrder/edit.vue

@@ -84,9 +84,9 @@
               class="button-error"
               id="bulkWarehousingOrderList-del-btn">删除</a-button>
           </template>
-          
+
           <template slot="productName" slot-scope="text, record">
-            {{record.productName}}
+            {{ record.productName }}
             <a-tag color="red" v-if="record.giftFlag==1">赠品</a-tag>
           </template>
         </s-table>
@@ -156,7 +156,7 @@ export default {
       const arr = [
         { title: '序号', dataIndex: 'no', width: '5%', align: 'center' },
         { title: '产品编码', dataIndex: 'productCode', width: '20%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '产品名称', scopedSlots: { customRender: 'productName' },width: '25%', align: 'center' },
+        { title: '产品名称', scopedSlots: { customRender: 'productName' }, width: '25%', align: 'center' },
         { title: '单位', dataIndex: 'unit', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '入库数量', dataIndex: 'productQty', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         // { title: '入库单价', dataIndex: 'productCost', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
@@ -209,10 +209,12 @@ export default {
     },
     // 导入产品
     hanldeOk (obj) {
+      this.spinning = true
       sparePartsDetailBatchInsert(obj).then(res => {
         if (res.status == 200) {
           this.$refs.table.refresh(true)
         }
+        this.spinning = false
       })
     },
     //  返回列表

+ 13 - 13
src/views/purchasingManagement/bulkWarehousingOrder/productModal.vue

@@ -18,12 +18,12 @@
         :wrapper-col="formItemLayout.wrapperCol"
         @keyup.enter.native="handleSave">
         <a-form-model-item label="供应商" prop="supplierSn">{{ (nowData&&nowData.supplierName) || '--' }}</a-form-model-item>
-        <a-form-model-item label="产品编码" prop="productSn">
+        <a-form-model-item label="产品编码" :prop="!itemSn?'productSn':''">
           <a-select
             show-search
             id="bulkWarehousingOrder-product-productSn"
             ref="productSn"
-            :disabled="itemSn"
+            v-if="!itemSn"
             v-model="form.productSn"
             placeholder="请选择"
             :filter-option="false"
@@ -35,6 +35,7 @@
             <a-spin v-if="fetching" slot="notFoundContent" size="small" />
             <a-select-option v-for="item in productData" :key="item.product.productSn + item.product.code" :value="item.product.productSn">{{ item.product.code }}</a-select-option>
           </a-select>
+          <span v-else>{{ form.productCode }}</span>
         </a-form-model-item>
         <a-form-model-item label="产品名称" prop="productName">{{ form.productName || '--' }}</a-form-model-item>
         <a-form-model-item label="原厂编码" prop="productOrigCode">{{ form.productOrigCode || '--' }}</a-form-model-item>
@@ -43,7 +44,6 @@
             @change="changeWarehouseCascade"
             v-model="form.warehouse"
             expand-trigger="hover"
-            :disabled="itemSn"
             :allowClear="false"
             :options="warehouseCascadeData"
             :fieldNames="{ label: 'name', value: 'sn', children: 'warehouseLocationList' }"
@@ -52,8 +52,8 @@
             style="width: 100%;" />
         </a-form-model-item>
         <a-form-model-item label="成本价">
-            <span style="margin-right:20px;">{{form.productCost || form.productCost == 0 ? form.productCost : '--'}}</span>
-            <a-checkbox v-if="productCost||isGift" :disabled="itemSn" v-model="isGift">是否为赠品</a-checkbox>
+          <span style="margin-right:20px;">{{ form.productCost || form.productCost == 0 ? form.productCost : '--' }}</span>
+          <a-checkbox v-if="productCost||isGift" :disabled="!!itemSn" v-model="isGift">是否为赠品</a-checkbox>
         </a-form-model-item>
         <a-form-model-item label="数量" prop="productQty">
           <a-input-number
@@ -123,7 +123,7 @@ export default {
         productCost: '',
         productQty: ''
       },
-      productCost:'',
+      productCost: '',
       rules: {
         productSn: [
           { required: true, message: '请选择产品编码', trigger: 'change' }
@@ -143,7 +143,7 @@ export default {
       warehouseCascadeData: [], //  仓库仓位  下拉数据
       warehouseSnBackups: '', //  仓库备份数据
       warehouseLocationSnBackups: '', //  仓位备份数据
-      defaultWarehouseCascade: [] ,//  默认仓库仓位
+      defaultWarehouseCascade: [], //  默认仓库仓位
       isGift: false
     }
   },
@@ -190,7 +190,7 @@ export default {
         if (res.status == 200) {
           const data = res.data
           this.form = Object.assign(this.form, data)
-          this.fetchUser(this.form.productCode)
+          // this.fetchUser(this.form.productCode)
           this.form.warehouse = [this.form.warehouseSn, this.form.warehouseLocationSn]
           this.warehouseSnBackups = this.form.warehouseSn || undefined
           this.warehouseLocationSnBackups = this.form.warehouseLocationSn || undefined
@@ -212,7 +212,7 @@ export default {
           if (!_this.itemSn) {
             delete form.id
             delete form.sparePartsDetailSn
-            if(!this.productCost){
+            if (!this.productCost) {
               _this.$message.warning('该产品没有设置成本价!')
               return false
             }
@@ -228,7 +228,7 @@ export default {
                   _this.resetData()
                   _this.$refs.productQty.blur()
                   _this.$refs.productSn.focus()
-                }else{
+                } else {
                   _this.isShow = false
                 }
               })
@@ -338,10 +338,10 @@ export default {
         this.getDetail()
       }
     },
-    isGift (newValue, oldValue){
-      if(newValue){
+    isGift (newValue, oldValue) {
+      if (newValue) {
         this.form.productCost = 0
-      }else{
+      } else {
         this.form.productCost = this.productCost
       }
     }

+ 3 - 1
src/views/supplierManagement/costSetting/addProductModal.vue

@@ -13,7 +13,7 @@
         <div style="display:flex;align-items: center;padding:10px 0;">
           <div style="font-size:14px;"><span style="color:red;">*</span>供应商名称:</div>
           <div style="flex-grow: 1;">
-            <supplier style="width:50%" v-model="supplierSn" @change="getChoosed" placeholder="请输入供应商名称搜索"></supplier>
+            <supplier style="width:50%" ref="supplier" v-model="supplierSn" @change="getChoosed" placeholder="请输入供应商名称搜索"></supplier>
           </div>
         </div>
         <div style="padding:10px 0;border-bottom: 1px solid #eee;">
@@ -210,6 +210,7 @@ export default {
       _this.$refs.ruleForm.validate(valid => {
         if (valid) {
           if (this.supplierSn) {
+            _this.$refs.table.clearTable()
             _this.$refs.table.refresh(true)
           } else {
             this.$message.warning('请先选择供应商!')
@@ -227,6 +228,7 @@ export default {
       this.queryParam.productTypeSn2 = ''
       this.queryParam.productTypeSn3 = ''
       this.queryParam.productType = []
+      this.supplierSn = undefined
     },
     //  重置
     resetSearchForm () {

+ 1 - 1
src/views/supplierManagement/costSetting/chooseImportModal.vue

@@ -146,7 +146,7 @@ export default {
         return
       }
       _this.spinning = true
-      hdExportExcel(supplierProductailNewExcel, _this.unLoadData, '关联产品导入错误项', function () {
+      hdExportExcel(supplierProductailNewExcel, _this.unLoadData, '成本设置产品导入错误项', function () {
         _this.spinning = false
       })
     }

+ 1 - 1
src/views/supplierManagement/costSetting/importGuideModal.vue

@@ -149,7 +149,7 @@ export default {
       const link = document.createElement('a')
       link.style.display = 'none'
       link.href = url
-      const fname = '关联产品导入模板'
+      const fname = '成本设置导入模板'
       link.setAttribute('download', fname + '.xlsx')
       document.body.appendChild(link)
       link.click()