Browse Source

隐藏积分相关的字段 控制角色显示

Qukatie 10 months ago
parent
commit
aeda5775ce

+ 48 - 47
src/views/tirePartsMall/basicData/commodityInformation/detailsPage.vue

@@ -450,48 +450,49 @@ export default {
                         prop: "inventoryAlert",
                         span: 8
                     },
+                    // {
+                    //     label: "防爆",
+                    //     prop: "explosionProof",
+                    //     span: 2,
+                    //     type: 'select',
+                    //     display: true,
+                    //     dicData: [{
+                    //         label: '否',
+                    //         value: 0
+                    //     }, {
+                    //         label: '是',
+                    //         value: 1
+                    //     }],
+                    // },
+                    // {
+                    //     label: "静音棉",
+                    //     prop: "originalFactory",
+                    //     span: 2,
+                    //     type: 'select',
+                    //     display: true,
+                    //     dicData: [{
+                    //         label: '否',
+                    //         value: 0
+                    //     }, {
+                    //         label: '是',
+                    //         value: 1
+                    //     }],
+                    // },
+                    // {
+                    //     label: "自修补",
+                    //     prop: "selfRecovery",
+                    //     span: 4,
+                    //     type: 'select',
+                    //     display: true,
+                    //     dicData: [{
+                    //         label: '否',
+                    //         value: 0
+                    //     }, {
+                    //         label: '是',
+                    //         value: 1
+                    //     }],
+                    // }, 
                     {
-                        label: "防爆",
-                        prop: "explosionProof",
-                        span: 2,
-                        type: 'select',
-                        display: true,
-                        dicData: [{
-                            label: '否',
-                            value: 0
-                        }, {
-                            label: '是',
-                            value: 1
-                        }],
-                    },
-                    {
-                        label: "静音棉",
-                        prop: "originalFactory",
-                        span: 2,
-                        type: 'select',
-                        display: true,
-                        dicData: [{
-                            label: '否',
-                            value: 0
-                        }, {
-                            label: '是',
-                            value: 1
-                        }],
-                    },
-                    {
-                        label: "自修补",
-                        prop: "selfRecovery",
-                        span: 4,
-                        type: 'select',
-                        display: true,
-                        dicData: [{
-                            label: '否',
-                            value: 0
-                        }, {
-                            label: '是',
-                            value: 1
-                        }],
-                    }, {
                         label: "是否管理批次号",
                         prop: "whether",
                         labelWidth: 120,
@@ -528,12 +529,12 @@ export default {
                     //     labelWidth: 120,
                     //     span: 8
                     // },
-                    {
-                        label: "积分",
-                        prop: "integral",
-                        display: true,
-                        span: 8
-                    },
+                    // {
+                    //     label: "积分",
+                    //     prop: "integral",
+                    //     display: true,
+                    //     span: 8
+                    // },
                     {
                         label: "备注",
                         prop: "remarks",

+ 9 - 9
src/views/tirePartsMall/basicData/customerInformation/detailsPage.vue

@@ -523,15 +523,15 @@ export default {
             controls: false,
             precision: 2,
           },
-          {
-            label: "积分余额",
-            prop: "pointsBalance",
-            span: 8,
-            type: "number",
-            controls: false,
-            precision: 2,
-            disabled: true,
-          },
+          // {
+          //   label: "积分余额",
+          //   prop: "pointsBalance",
+          //   span: 8,
+          //   type: "number",
+          //   controls: false,
+          //   precision: 2,
+          //   disabled: true,
+          // },
           {
             label: "品牌",
             prop: "brandId",

+ 2 - 2
src/views/tirePartsMall/productionManagement/productionOrder/detailsPage.vue

@@ -26,11 +26,11 @@
                 <el-button  v-if="form.statusName == '生产中'" class="el-button--small-yh" style="margin-left: 6px;" type="success" size="small"
                     :disabled="editButton || isSaveBtn " @click="generatePicking">领 料
                 </el-button>
-                <el-button v-if="form.statusName == '待确认'&&(roleName=='admin'||roleName=='库管')" class="el-button--small-yh" style="margin-left: 6px;"
+                <el-button v-if="form.statusName == '待确认'&&(roleName.indexOf('admin') != -1||roleName.indexOf('库管') != -1)" class="el-button--small-yh" style="margin-left: 6px;"
                     type="warning" size="small" :disabled="editButton || isSaveBtn"
                     @click="confirm">确 认
                 </el-button>
-                <el-button v-if="form.statusName == '已确认'&&(roleName=='admin'||roleName=='库管')" class="el-button--small-yh" style="margin-left: 6px;"
+                <el-button v-if="form.statusName == '已确认'&&(roleName.indexOf('admin') != -1||roleName.indexOf('库管') != -1)" class="el-button--small-yh" style="margin-left: 6px;"
                     type="danger" size="small" :disabled="editButton || isSaveBtn" @click="revokeConfirm">撤销确认
                 </el-button>
                 <!-- <el-button class="el-button--small-yh" style="margin-left: 6px;" type="info" size="small"

+ 27 - 20
src/views/tirePartsMall/productionManagement/productionPicking/detailsPage.vue

@@ -19,11 +19,13 @@
         <el-button v-if="form.statusName == '待确认'" class="el-button--small-yh" style="margin-left: 6px;" type="danger"
           size="small" :disabled="!form.id || editButton" @click="revokePicking">撤销领料
         </el-button>
-        <el-button v-if="form.statusName == '待确认'&&(roleName=='admin'||roleName=='库管')" class="el-button--small-yh" style="margin-left: 6px;" type="success"
-          size="small" :disabled="!form.id || editButton" @click="confirm">确 认
+        <el-button v-if="form.statusName == '待确认' && (roleName.indexOf('admin') != -1 || roleName.indexOf('库管') != -1)"
+          class="el-button--small-yh" style="margin-left: 6px;" type="success" size="small"
+          :disabled="!form.id || editButton" @click="confirm">确 认
         </el-button>
-        <el-button v-if="form.statusName == '已确认'&&(roleName=='admin'||roleName=='库管')" class="el-button--small-yh" style="margin-left: 6px;" type="danger"
-          size="small" :disabled="!form.id || editButton" @click="revokeConfirm">撤销确认
+        <el-button v-if="form.statusName == '已确认' && (roleName.indexOf('admin') != -1 || roleName.indexOf('库管') != -1)"
+          class="el-button--small-yh" style="margin-left: 6px;" type="danger" size="small"
+          :disabled="!form.id || editButton" @click="revokeConfirm">撤销确认
         </el-button>
       </div>
     </div>
@@ -54,11 +56,12 @@
             <el-button type="primary" icon="el-icon-plus" size="small"
               :disabled="editButton || form.statusName == '待确认' || form.statusName == '已确认'"
               @click="rowAdd(row, 1)">添加商品</el-button>
-            <el-popover placement="top" width="400" trigger="click" @show="inventoryShow2()">
-              <avue-crud :data="inventoryList" :option="inventoryOption">
+            <el-popover placement="top" width="400" trigger="click">
+              <avue-crud :data="inventoryData" :option="inventoryOption">
               </avue-crud>
               <el-button slot="reference" type="primary" plain size="small"
-                :disabled="selectionMultilist.length != 1 || form.businessSource == '外部销售'">查看库存</el-button>
+                :disabled="selectionMultilist.length != 1 || form.businessSource == '外部销售'"
+                @click="viewInventory">查看库存</el-button>
             </el-popover>
             <!-- <el-button type="primary" icon="el-icon-printer" size="small" @click="handlePrint">打印</el-button> -->
             <el-button type="danger" plain size="small" @click="batchDelete"
@@ -191,6 +194,7 @@ export default {
   data() {
     return {
       roleName: localStorage.getItem("roleName"),
+      inventoryData: [],
       inventoryData2: [],
       sharedCompany: null,
       distributeVisible: false,
@@ -202,19 +206,18 @@ export default {
         align: 'center',
         column: [
           {
-            label: '来源公司',
-            prop: 'srcSalesCompanyName',
+            label: '仓库',
+            prop: 'storageName',
             overHidden: true,
-
           },
           {
             label: '商品名称',
-            prop: 'goodsName',
+            prop: 'cname',
             overHidden: true,
-          },
+          }, 
           {
             label: '库存数量',
-            prop: 'inventory',
+            prop: 'balanceQuantity',
             overHidden: true,
           }
         ]
@@ -499,12 +502,11 @@ export default {
         {
           label: '业务日期',
           prop: "businesDate",
-          searchProp: "businesDateList",
           disabled: false,
-          type: "datetime",
-          value: dateFormat(new Date(), 'yyyy-MM-dd hh:mm:ss'),
-          format: "yyyy-MM-dd HH:mm",
-          valueFormat: "yyyy-MM-dd HH:mm:ss",
+          type: "date",
+          value: dateFormat(new Date(), 'yyyy-MM-dd'),
+          format: "yyyy-MM-dd",
+          valueFormat: "yyyy-MM-dd",
           rules: [
             {
               required: true,
@@ -845,10 +847,15 @@ export default {
     removeStagList(row, index, type) {
       this.goodsListSave.splice(row.$index, 1)
     },
+    viewInventory() {
+      inventoryList({ cname: this.selectionMultilist[0].goodsName }).then(res => {
+        this.inventoryData = res.data.data.records
+      })
+    },
     viewInventory2() {
-      inventoryList({ cname: this.selectionMultilist[0].goodsName }).then(res => [
+      inventoryList({ cname: this.selectionMultilist[0].goodsName }).then(res => {
         this.inventoryData2 = res.data.data.records
-      ])
+      })
     },
     synchronous(row) {
       this.form.shipItemsList.forEach(e => {