howie преди 2 години
родител
ревизия
e9e80e0f84

+ 6 - 2
src/store/getters.js

@@ -7,13 +7,17 @@ const getters = {
   userid: (state) => state.user.userid,
   phone: (state) => state.user.phone,
   name: (state) => state.user.name,
-  isNotice:(state) =>state.user.isNotice,
+  isNotice: (state) => state.user.isNotice,
   menus: (state) => state.user.menus,
+  websitNumber: (state) => state.websitNumber,
   customerId: (state) => state.user.customerId,
   customerName: (state) => state.user.customerName,
   customerNumber: (state) => state.user.customerNumber,
   showMessages: (state) => state.user.showMessages,
   code: (state) => state.sales.code,
-  isCustomer:state => state.user.customerId  && state.user.customerName &&  state.user.customerNumber
+  isCustomer: (state) =>
+    state.user.customerId &&
+    state.user.customerName &&
+    state.user.customerNumber,
 };
 export default getters;

+ 10 - 6
src/store/modules/user.js

@@ -20,7 +20,8 @@ const getDefaultState = () => {
     customerName: "", //经销商名称
     customerNumber: "", //经销商编码
     showMessages: null, //
-    isNotice:false
+    isNotice: false,
+    websitNumber: "",
   };
 };
 
@@ -30,8 +31,8 @@ const mutations = {
   RESET_STATE: (state) => {
     Object.assign(state, getDefaultState());
   },
-  SET_STATUS(state,status){
-    state.isNotice = status
+  SET_STATUS(state, status) {
+    state.isNotice = status;
   },
   SET_USERID: (state, userid) => {
     state.userid = userid;
@@ -57,13 +58,15 @@ const mutations = {
   SET_CUSTOMERNUMBER: (state, customerNumber) => {
     state.customerNumber = customerNumber;
   },
+  SET_WEBSIT_NUMBER: (state, websitNumber) => {
+    state.websitNumber = websitNumber;
+  },
   showMessage: (state, value) => {
     if (value == "yes") {
       state.showMessages = true;
     } else {
       state.showMessages = false;
-      state.isNotice = true
-
+      state.isNotice = true;
     }
   },
 };
@@ -115,8 +118,8 @@ const actions = {
             customerId,
             customerName,
             customerNumber,
+            adminWebsit: { websitNumber },
           } = data;
-
           // 模拟请求数据
           // const menus = [
           // {
@@ -147,6 +150,7 @@ const actions = {
           commit("SET_CUSTOMERNUMBER", customerNumber);
           commit("SET_NAME", nickName);
           commit("SET_PHONE", userName);
+          commit("SET_WEBSIT_NUMBER", websitNumber);
           // commit("SET_MENUS", menus) // 触发vuex SET_MENUS 保存路由表到vuex
 
           localStorage.setItem("supply_user", JSON.stringify(data));

+ 3 - 3
src/views/supply/engin/components/commerce_detail.vue

@@ -157,10 +157,10 @@
                 <el-checkbox
                   v-model="detailData.isPlanOrder"
                   disabled
-                  :true-label="true"
-                  :false-label="false"
+                  true-label="true"
+                  false-label="false"
                 >
-                  {{ detailData.isPlanOrder === true ? "是" : "否" }}
+                  {{ detailData.isPlanOrder === "true" ? "是" : "否" }}
                 </el-checkbox>
               </div>
             </el-col>

+ 265 - 103
src/views/supply/engin/components/commerce_examine.vue

@@ -87,7 +87,7 @@
         <el-col :span="8" class="item">
           <div class="label">不扣押金</div>
           <div class="value">
-            {{ detailData.takeDeposit ? '是':'否' }}
+            {{ detailData.takeDeposit ? "是" : "否" }}
             <!-- <el-checkbox v-model="detailData.takeDeposit">{{detailData.takeDeposit ? '是':'否'}}</el-checkbox> -->
           </div>
         </el-col>
@@ -102,13 +102,19 @@
         <el-col :span="24" class="item">
           <div class="label">格力回复</div>
           <div class="value">
-            <el-input v-model="detailData.geLiNote" placeholder="请输入格力回复" />
+            <el-input
+              v-model="detailData.geLiNote"
+              placeholder="请输入格力回复"
+            />
           </div>
         </el-col>
         <el-col :span="24" class="item">
           <div class="label">格力内部备注</div>
           <div class="value">
-            <el-input v-model="detailData.geLiInerNote" placeholder="请输入格力内部备注" />
+            <el-input
+              v-model="detailData.geLiInerNote"
+              placeholder="请输入格力内部备注"
+            />
           </div>
         </el-col>
         <el-col :span="24" class="item">
@@ -136,10 +142,14 @@
         <el-col :span="24" class="item">
           <div class="label">计划单</div>
           <div class="value">
-            <el-checkbox v-model="detailData.isPlanOrder" disabled :true-label="true" :false-label="false">
-              {{ detailData.isPlanOrder===true?'是':'否' }}
+            <el-checkbox
+              v-model="detailData.isPlanOrder"
+              disabled
+              true-label="true"
+              false-label="false"
+            >
+              {{ detailData.isPlanOrder === "true" ? "是" : "否" }}
             </el-checkbox>
-
           </div>
         </el-col>
       </el-row>
@@ -162,52 +172,178 @@
         :summary-method="$getSummaries"
       >
         <el-table-column align="center" label="序号" type="index" width="50" />
-        <el-table-column align="left" label="引用记录" prop="useRefCount" min-width="100" show-overflow-tooltip />
-        <el-table-column align="left" label="销售类型" prop="saleTypeName" min-width="100" show-overflow-tooltip />
-        <el-table-column align="left" label="物料编码" prop="materialNumber" min-width="120" show-overflow-tooltip />
-        <el-table-column align="left" label="产品编码" prop="materialOldNumber" min-width="120" show-overflow-tooltip />
-        <el-table-column align="left" label="产品名称" prop="materialName" min-width="160" show-overflow-tooltip />
-        <el-table-column align="left" label="规格型号" prop="specification" min-width="350" show-overflow-tooltip />
-        <el-table-column align="left" label="单位" prop="unit" min-width="100" show-overflow-tooltip />
-        <el-table-column align="right" label="单价" prop="price" min-width="100" show-overflow-tooltip>
+        <el-table-column
+          align="left"
+          label="引用记录"
+          prop="useRefCount"
+          min-width="100"
+          show-overflow-tooltip
+        />
+        <el-table-column
+          align="left"
+          label="销售类型"
+          prop="saleTypeName"
+          min-width="100"
+          show-overflow-tooltip
+        />
+        <el-table-column
+          align="left"
+          label="物料编码"
+          prop="materialNumber"
+          min-width="120"
+          show-overflow-tooltip
+        />
+        <el-table-column
+          align="left"
+          label="产品编码"
+          prop="materialOldNumber"
+          min-width="120"
+          show-overflow-tooltip
+        />
+        <el-table-column
+          align="left"
+          label="产品名称"
+          prop="materialName"
+          min-width="160"
+          show-overflow-tooltip
+        />
+        <el-table-column
+          align="left"
+          label="规格型号"
+          prop="specification"
+          min-width="350"
+          show-overflow-tooltip
+        />
+        <el-table-column
+          align="left"
+          label="单位"
+          prop="unit"
+          min-width="100"
+          show-overflow-tooltip
+        />
+        <el-table-column
+          align="right"
+          label="单价"
+          prop="price"
+          min-width="100"
+          show-overflow-tooltip
+        >
           <template slot-scope="scope">
             {{ scope.row.price | numToFixed }}
             <!-- <el-input v-model="scope.row.price" size="small" type="number" @mousewheel.native.prevent></el-input> -->
           </template>
         </el-table-column>
-        <el-table-column align="right" label="工程登录数量" prop="enginNum" min-width="100" show-overflow-tooltip />
-        <el-table-column align="right" label="数量" prop="number" min-width="100" show-overflow-tooltip />
-        <el-table-column align="right" label="订单金额" prop="totalAmount" min-width="100" show-overflow-tooltip>
+        <el-table-column
+          align="right"
+          label="工程登录数量"
+          prop="enginNum"
+          min-width="100"
+          show-overflow-tooltip
+        />
+        <el-table-column
+          align="right"
+          label="数量"
+          prop="number"
+          min-width="100"
+          show-overflow-tooltip
+        />
+        <el-table-column
+          align="right"
+          label="订单金额"
+          prop="totalAmount"
+          min-width="100"
+          show-overflow-tooltip
+        >
           <template slot-scope="scope">
             {{ scope.row.totalAmount | numToFixed }}
           </template>
         </el-table-column>
-        <el-table-column align="left" label="返利类型" prop="customerWalletName2" min-width="100" show-overflow-tooltip />
-        <el-table-column align="right" label="使用返利金额" prop="payRebateAmount" min-width="100" show-overflow-tooltip>
+        <el-table-column
+          align="left"
+          label="返利类型"
+          prop="customerWalletName2"
+          min-width="100"
+          show-overflow-tooltip
+        />
+        <el-table-column
+          align="right"
+          label="使用返利金额"
+          prop="payRebateAmount"
+          min-width="100"
+          show-overflow-tooltip
+        >
           <template slot-scope="scope">
             {{ scope.row.payRebateAmount | numToFixed }}
           </template>
         </el-table-column>
-        <el-table-column align="right" label="格力折扣" prop="discAmount" min-width="100" show-overflow-tooltip>
+        <el-table-column
+          align="right"
+          label="格力折扣"
+          prop="discAmount"
+          min-width="100"
+          show-overflow-tooltip
+        >
           <template slot-scope="scope">
             {{ scope.row.discAmount | numToFixed }}
           </template>
         </el-table-column>
-        <el-table-column align="left" label="现金钱包" prop="customerWalletName" min-width="100" show-overflow-tooltip />
-        <el-table-column align="right" label="实付金额" prop="payAmount" min-width="100" show-overflow-tooltip>
+        <el-table-column
+          align="left"
+          label="现金钱包"
+          prop="customerWalletName"
+          min-width="100"
+          show-overflow-tooltip
+        />
+        <el-table-column
+          align="right"
+          label="实付金额"
+          prop="payAmount"
+          min-width="100"
+          show-overflow-tooltip
+        >
           <template slot-scope="scope">
             {{ scope.row.payAmount | numToFixed }}
           </template>
         </el-table-column>
-        <el-table-column align="left" label="是否直调" prop="isDirectTransfer" min-width="100" show-overflow-tooltip>
+        <el-table-column
+          align="left"
+          label="是否直调"
+          prop="isDirectTransfer"
+          min-width="100"
+          show-overflow-tooltip
+        >
           <template slot-scope="scope">
-            {{ scope.row.isDirectTransfer ? '是' : '否' }}
+            {{ scope.row.isDirectTransfer ? "是" : "否" }}
           </template>
         </el-table-column>
-        <el-table-column align="right" label="直调数量" prop="directTransferQty" min-width="100" show-overflow-tooltip />
-        <el-table-column align="right" label="已发货数量" prop="hasSendQty" min-width="100" show-overflow-tooltip />
-        <el-table-column align="left" label="备注" prop="remark" min-width="160" show-overflow-tooltip />
-        <el-table-column align="left" label="税率" prop="tax" min-width="100" show-overflow-tooltip />
+        <el-table-column
+          align="right"
+          label="直调数量"
+          prop="directTransferQty"
+          min-width="100"
+          show-overflow-tooltip
+        />
+        <el-table-column
+          align="right"
+          label="已发货数量"
+          prop="hasSendQty"
+          min-width="100"
+          show-overflow-tooltip
+        />
+        <el-table-column
+          align="left"
+          label="备注"
+          prop="remark"
+          min-width="160"
+          show-overflow-tooltip
+        />
+        <el-table-column
+          align="left"
+          label="税率"
+          prop="tax"
+          min-width="100"
+          show-overflow-tooltip
+        />
       </el-table>
     </div>
 
@@ -226,136 +362,162 @@
         </el-col>
         <el-col :span="24" class="item">
           <div class="label">审批说明</div>
-          <div class="value"><el-input v-model="examineForm.remark" placeholder="请输入审批说明" /></div>
+          <div class="value">
+            <el-input
+              v-model="examineForm.remark"
+              placeholder="请输入审批说明"
+            />
+          </div>
         </el-col>
       </el-row>
     </div>
 
     <div class="page-footer">
       <div class="footer">
-        <el-button type="primary" @click="clickSubmitForm(1)">审批通过</el-button>
-        <el-button type="warning" @click="clickSubmitForm(0)">审批驳回</el-button>
-        <el-popconfirm title="确定关闭吗?" style="margin-left: 10px;" @onConfirm="goBack">
+        <el-button type="primary" @click="clickSubmitForm(1)"
+          >审批通过</el-button
+        >
+        <el-button type="warning" @click="clickSubmitForm(0)"
+          >审批驳回</el-button
+        >
+        <el-popconfirm
+          title="确定关闭吗?"
+          style="margin-left: 10px"
+          @onConfirm="goBack"
+        >
           <el-button slot="reference">返回列表</el-button>
         </el-popconfirm>
       </div>
     </div>
-
   </div>
 </template>
 
 <script>
-import { getOrderDetail, examineCom } from '@/api/supply/engin'
+import { getOrderDetail, examineCom } from "@/api/supply/engin";
 
 export default {
-  name: 'CommerceExamine',
-  componentName: 'CommerceExamine',
+  name: "CommerceExamine",
+  componentName: "CommerceExamine",
   filters: {
     statusFilter(val) {
       const statusList = [
-        { label: '已保存', value: 'SAVE' },
-        { label: '待审核', value: 'WAIT' },
-        { label: '审核通过', value: 'OK' },
+        { label: "已保存", value: "SAVE" },
+        { label: "待审核", value: "WAIT" },
+        { label: "审核通过", value: "OK" },
         // { label: '审核驳回', value: 'FAIL' },,
-        { label: '已关闭', value: 'CLOSE' }
-      ]
-      const obj = statusList.find(o => o.value == val)
-      return obj ? obj.label : ''
-    }
+        { label: "已关闭", value: "CLOSE" },
+      ];
+      const obj = statusList.find((o) => o.value == val);
+      return obj ? obj.label : "";
+    },
   },
-  props: ['listItem'],
+  props: ["listItem"],
   data() {
     return {
-      userName: JSON.parse(localStorage.getItem('supply_user')).nickName,
+      userName: JSON.parse(localStorage.getItem("supply_user")).nickName,
       detailData: {},
 
       formLoading: false,
       examineForm: {
-        remark: ''
-      }
-    }
+        remark: "",
+      },
+    };
   },
 
   created() {
-    this.getDetail()
+    this.getDetail();
   },
 
   methods: {
     getDate() {
-      var date = new Date()
-      var seperator1 = '-'
-      var year = date.getFullYear()
-      var month = date.getMonth() + 1
-      var strDate = date.getDate()
+      var date = new Date();
+      var seperator1 = "-";
+      var year = date.getFullYear();
+      var month = date.getMonth() + 1;
+      var strDate = date.getDate();
       if (month >= 1 && month <= 9) {
-        month = '0' + month
+        month = "0" + month;
       }
       if (strDate >= 0 && strDate <= 9) {
-        strDate = '0' + strDate
+        strDate = "0" + strDate;
       }
-      var currentdate = year + seperator1 + month + seperator1 + strDate
-      return currentdate
+      var currentdate = year + seperator1 + month + seperator1 + strDate;
+      return currentdate;
     },
 
     // 返回列表
     goBack() {
-      this.$emit('backListFormDetail')
+      this.$emit("backListFormDetail");
     },
 
     // 获取详情
     getDetail() {
-      getOrderDetail({ id: this.listItem.parentId }).then(res => {
+      getOrderDetail({ id: this.listItem.parentId }).then((res) => {
         if (res.data.items) {
-          res.data.items.forEach(item => {
-            item.number = (item.qty * 100 - item.retiredQty * 100) / 100
-            item.sums1 = ['number', 'directTransferQty', 'qty', 'enginNum', 'refundableQty', 'tdQty']
-            item.sums2 = ['totalAmount', 'payAmount', 'price', 'payRebateAmount', 'discAmount']
-          })
+          res.data.items.forEach((item) => {
+            item.number = (item.qty * 100 - item.retiredQty * 100) / 100;
+            item.sums1 = [
+              "number",
+              "directTransferQty",
+              "qty",
+              "enginNum",
+              "refundableQty",
+              "tdQty",
+            ];
+            item.sums2 = [
+              "totalAmount",
+              "payAmount",
+              "price",
+              "payRebateAmount",
+              "discAmount",
+            ];
+          });
         }
-        this.detailData = res.data
-        this.examineForm.remark = res.data.examineNote
-      })
+        this.detailData = res.data;
+        this.examineForm.remark = res.data.examineNote;
+      });
     },
 
     // 审批
     clickSubmitForm(val) {
-      this.$confirm('此操作将审批订单, 是否继续?', '提示', {
-        confirmButtonText: '确定',
-        cancelButtonText: '取消',
-        type: 'warning'
-      }).then(() => {
-        const params = this.detailData
-        params.examineNote = this.examineForm.remark
-        params.examineResult = val
-        examineCom(params).then(res => {
-          this.$successMsg()
-          this.goBack()
-          this.$parent.getList()
+      this.$confirm("此操作将审批订单, 是否继续?", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      })
+        .then(() => {
+          const params = this.detailData;
+          params.examineNote = this.examineForm.remark;
+          params.examineResult = val;
+          examineCom(params).then((res) => {
+            this.$successMsg();
+            this.goBack();
+            this.$parent.getList();
+          });
         })
-      }).catch(() => {})
-    }
-
-  }
-}
+        .catch(() => {});
+    },
+  },
+};
 </script>
 
 <style scoped lang="scss">
-  .detail-container {
-    width: 100%;
-    height: 100%;
-  }
-  .main-title {
-    display: flex;
-    justify-content: space-between;
-    align-items: center;
-    margin-top: 20px;
-    height: 60px;
-    border-bottom: 1px solid #DCDFE6;
-    margin-bottom: 20px;
-    .title {
-      font-size: 16px;
-      font-weight: 600;
-      padding-left: 10px;
-    }
+.detail-container {
+  width: 100%;
+  height: 100%;
+}
+.main-title {
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+  margin-top: 20px;
+  height: 60px;
+  border-bottom: 1px solid #dcdfe6;
+  margin-bottom: 20px;
+  .title {
+    font-size: 16px;
+    font-weight: 600;
+    padding-left: 10px;
   }
+}
 </style>

Файловите разлики са ограничени, защото са твърде много
+ 512 - 183
src/views/supply/engin/components/commerce_form.vue


+ 14 - 2
src/views/supply/engin/components/engin_detail.vue

@@ -240,11 +240,23 @@
       </div>
       <div class="diy-table-1">
         <el-row :gutter="0">
-          <el-col :span="12" class="item">
+          <el-col :span="8" class="item">
             <div class="label">审批人</div>
             <div class="value">{{ detailData.confirmName }}</div>
           </el-col>
-          <el-col :span="12" class="item">
+          <el-col :span="8" class="item">
+            <div class="label">是否计划单</div>
+            <div class="value">
+              <el-radio-group
+                v-model="detailData.examineForm.isPlanOrder"
+                :disabled="true"
+              >
+                <el-radio label="true">是</el-radio>
+                <el-radio label="false">否</el-radio>
+              </el-radio-group>
+            </div>
+          </el-col>
+          <el-col :span="8" class="item">
             <div class="label">审批结果</div>
             <div class="value">
               {{ detailData.examineStatus | statusFilter }}

+ 10 - 4
src/views/supply/engin/components/engin_examine.vue

@@ -373,9 +373,12 @@
         <el-col :span="8" class="item">
           <div class="label">是否计划单</div>
           <div class="value">
-            <el-radio-group v-model="examineForm.isPlanOrder">
-              <el-radio :label="true">是</el-radio>
-              <el-radio :label="false">否</el-radio>
+            <el-radio-group
+              v-model="examineForm.isPlanOrder"
+              :disabled="websitNumber === '广州'"
+            >
+              <el-radio label="true">是</el-radio>
+              <el-radio label="false">否</el-radio>
             </el-radio-group>
           </div>
         </el-col>
@@ -700,7 +703,7 @@ export default {
   },
 
   computed: {
-    ...mapGetters(["isCustomer"]),
+    ...mapGetters(["isCustomer", "websitNumber"]),
   },
 
   watch: {
@@ -732,6 +735,9 @@ export default {
 
     // 获取详情
     getDetail() {
+      if (this.websitNumber === "广州") {
+        this.examineForm.isPlanOrder = false;
+      }
       getEnginDetail({ id: this.listItem.enginInfoId }).then((res) => {
         this.detailData = res.data;
         this.examineStatus = res.data.examineStatus;

Някои файлове не бяха показани, защото твърде много файлове са промени