lilei 1 年之前
父节点
当前提交
5744f6b0a4

+ 5 - 13
src/views/purchasingManagement/purchaseOrder/edit.vue

@@ -128,7 +128,7 @@
                   {{ record.packQty||'--' }}{{ record.packQty ? record.unit : '' }}/{{ record.packQtyUnit||'--' }}
                 </template>
                 <!-- 产品编码 -->
-                <!-- <template slot="code" slot-scope="text, record">
+                <template slot="code" slot-scope="text, record">
                   <a-tooltip placement="top" v-if="record.stockState=='NOT_ENOUGH'">
                     <template slot="title">
                       该产品暂时缺货!
@@ -136,7 +136,7 @@
                     <span class="noStock">{{ record.code || '--' }}</span>
                   </a-tooltip>
                   <span v-else>{{ record.code || '--' }}</span>
-                </template> -->
+                </template>
                 <!-- 采购数量 -->
                 <template slot="storageQuantity" slot-scope="text, record">
                   <a-input-number
@@ -327,7 +327,6 @@ export default {
         })
       },
       // -------已选产品-------------
-      orderCountData: null,
       delLoading: false,
       productForm: {
         productName: '',
@@ -339,9 +338,7 @@ export default {
       chooseLoadData: parameter => {
         this.disabled = true
         // 查询总计
-        // const params = Object.assign(parameter, this.productForm, { purchaseBillSn: this.$route.params.sn })
         const params = Object.assign({ pageNo: 1, pageSize: 5000 }, this.productForm, { purchaseBillSn: this.$route.params.sn })
-        // this.getCountQuery(params)
         return purchaseDetailList(params).then(res => {
           const data = res.data
           const no = (data.pageNo - 1) * data.pageSize
@@ -369,8 +366,6 @@ export default {
       const _this = this
       const arr = [
         { title: '序号', dataIndex: 'no', width: '5%', align: 'center' },
-        // { title: '产品编码', scopedSlots: { customRender: 'code' }, width: '15%', align: 'center', sorter: true },
-        { title: '产品编码', dataIndex: 'code', width: '15%', align: 'center', customRender: function (text) { return text || '--' }, sorter: true },
         { title: '产品名称', dataIndex: 'name', width: '23%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '原厂编码', dataIndex: 'origCode', width: '14%', align: 'center', customRender: function (text) { return text && text != ' ' ? text : '--' } },
         { title: '单位', dataIndex: 'unit', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },
@@ -384,7 +379,10 @@ export default {
       ]
       // 产品来源
       if (this.isDealerUp) {
+        arr.splice(1,0,{ title: '产品编码', scopedSlots: { customRender: 'code' }, width: '15%', align: 'center', sorter: true })
         arr.splice(6, 0, { title: '产品来源', dataIndex: 'sysFlagDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } })
+      }else{
+        arr.splice(1,0,{ title: '产品编码', dataIndex: 'code', width: '15%', align: 'center', customRender: function (text) { return text || '--' }, sorter: true })
       }
       if (this.$hasPermissions('M_ShowAllCost')) {
         arr.splice(this.isDealerUp ? 7 : 6, 0, { title: '成本价', dataIndex: 'purchasePrice', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text, 2) : '--') } })
@@ -412,12 +410,6 @@ export default {
     }
   },
   methods: {
-    // 获取采购单明细统计
-    getCountQuery (params) {
-      purchaseDetailCount(params).then(res => {
-        this.orderCountData = res.data || null
-      })
-    },
     // 获取采购单基本信息
     getOrderDetail () {
       purchaseDetailBySn({ sn: this.$route.params.sn }).then(res => {

+ 5 - 4
src/views/purchasingManagement/purchaseOrderNew/chooseProductModal.vue

@@ -74,7 +74,7 @@
             {{ record.packQty||'--' }}{{ record.packQty ? record.unit : '' }}/{{ record.packQtyUnit||'--' }}
           </template>
           <!-- 产品编码 -->
-          <!-- <template slot="code" slot-scope="text, record">
+          <template slot="code" slot-scope="text, record">
             <a-tooltip placement="top" v-if="record.stockState=='NOT_ENOUGH'">
               <template slot="title">
                 该产品暂时缺货!
@@ -82,7 +82,7 @@
               <span class="noStock">{{ record.code || '--' }}</span>
             </a-tooltip>
             <span v-else>{{ record.code || '--' }}</span>
-          </template> -->
+          </template>
           <!-- 采购数量 -->
           <template slot="storageQuantity" slot-scope="text, record">
             <div @dblclick.stop>
@@ -228,8 +228,6 @@ export default {
     columns () {
       const _this = this
       const arr = [
-        // { title: '产品编码', scopedSlots: { customRender: 'code' }, width: '150px', align: 'center', fixed: 'left' },
-        { title: '产品编码', dataIndex: 'code', width: '150px', align: 'center', customRender: function (text) { return text || '--' }, fixed: 'left', sorter: true },
         { title: '产品名称', dataIndex: 'name', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '原厂编码', dataIndex: 'origCode', width: '150px', align: 'center', customRender: function (text) { return text && text != ' ' ? text : '--' } },
         { title: '在途数', dataIndex: 'transitQty', width: '80px', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
@@ -244,7 +242,10 @@ export default {
       ]
       // 产品来源
       if (this.isDealerUp) {
+        arr.splice(0,0,{ title: '产品编码', scopedSlots: { customRender: 'code' }, width: '150px', align: 'center', fixed: 'left' })
         arr.splice(2, 0, { title: '产品来源', dataIndex: 'sysFlagDictValue', width: '100px', align: 'center', customRender: function (text) { return text || '--' } })
+      }else{
+        arr.splice(0,0,{ title: '产品编码', dataIndex: 'code', width: '150px', align: 'center', customRender: function (text) { return text || '--' }, fixed: 'left', sorter: true })
       }
       if (this.$hasPermissions('M_ShowAllCost')) {
         arr.splice(this.isDealerUp ? 4 : 3, 0, { title: '成本价', dataIndex: 'purchasePrice', width: '100px', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text, 2) : '--') } })