yusheng пре 1 година
родитељ
комит
7a4c14e3d3

+ 33 - 0
src/api/bpm/components/saleManage/exceptionManagement.js

@@ -0,0 +1,33 @@
+import request from '@/utils/request';
+
+/**
+ * 列表
+ */
+ export async function getList (params) {
+    const res = await request.get('/eom/exceptionmanagement/page', {params});
+    if (res.data.code == 0) {
+      return res.data.data;
+    }
+    return Promise.reject(new Error(res.data.message));
+  }
+/**
+ * 详情
+ */
+export async function getById (id) {
+  const res = await request.get('/eom/exceptionmanagement/getById/'+id);
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+/**
+ * 跟新
+ */
+  // 编辑
+  export async function update (data) {
+    const res = await request.put(`/eom/exceptionmanagement/update`, data);
+    if (res.data.code == 0) {
+      return res.data.message;
+    }
+    return Promise.reject(new Error(res.data.message));
+  }

+ 7 - 1
src/enum/dict.js

@@ -137,4 +137,10 @@ export const proStatusEnum = [
 export const pricingWayList= [
   { id: 1, name: '按数量计费' },
   { id: 2, name: '按重量计费' }
-]
+
+]
+//来源类型
+export const relationType= {
+  1: '收货确认单',
+
+}

+ 2 - 2
src/views/bpm/handleTask/components/purchaseOrder/detailDialog.vue

@@ -105,9 +105,9 @@
           >
             {{ form.totalAmount }}元
           </el-form-item>
-          <el-form-item label="计价方式:" style="margin-bottom: 16px">
+          <!-- <el-form-item label="计价方式:" style="margin-bottom: 16px">
             {{ form.pricingWay == 1 ? '按数量计费' : '按重量计费' }}
-          </el-form-item>
+          </el-form-item> -->
         </el-col>
       </el-row>
       <headerTitle title="基本信息"></headerTitle>

+ 298 - 0
src/views/bpm/handleTask/components/saleOrder/exceptionManagement/addOrEditDialog.vue

@@ -0,0 +1,298 @@
+<template>
+  <div>
+    <el-form ref="form" :model="form" label-width="120px" class="el-form-box">
+      <headerTitle title="基本信息"></headerTitle>
+
+      <el-row :gutter="12">
+        <el-col :span="8">
+          <el-form-item label="编码" prop="code">
+            <el-input
+              v-model="form.code"
+              placeholder="请输入"
+              :disabled="true"
+            />
+          </el-form-item>
+        </el-col>
+
+        <el-col :span="8">
+          <el-form-item label="名称" prop="name">
+            <el-input clearable v-model="form.name" :disabled="true" />
+          </el-form-item>
+        </el-col>
+        <el-col :span="8">
+          <el-form-item label="来源类型" prop="relationType">
+            <el-input
+              clearable
+              v-model="form.relationTypeName"
+              :disabled="true"
+            />
+          </el-form-item>
+        </el-col>
+        <el-col :span="8">
+          <el-form-item label="来源编码" prop="relationCode">
+            <el-input clearable v-model="form.relationCode" :disabled="true" />
+          </el-form-item>
+        </el-col>
+        <el-col :span="8">
+          <el-form-item label="来源名称" prop="relationName">
+            <el-input clearable v-model="form.relationName" :disabled="true" />
+          </el-form-item>
+        </el-col>
+        <el-col :span="8">
+          <el-form-item label="创建人" prop="createUserName">
+            <el-input
+              clearable
+              v-model="form.createUserName"
+              :disabled="true"
+            />
+          </el-form-item>
+        </el-col>
+        <el-col :span="8">
+          <el-form-item label="创建时间" prop="createTime">
+            <el-input clearable v-model="form.createTime" :disabled="true" />
+          </el-form-item>
+        </el-col>
+      </el-row>
+    </el-form>
+
+    <headerTitle title="产品清单" style="margin-top: 30px"></headerTitle>
+    <ele-pro-table
+      ref="table"
+      :needPage="false"
+      :columns="columns"
+      :toolkit="[]"
+      :datasource="form.detailList"
+      row-key="id"
+    >
+      <template v-slot:headerExceptionDispose="{ column }">
+        <span class="is-required">{{ column.label }}</span>
+      </template>
+      <template v-slot:exceptionDispose="scope">
+        <el-select v-model="scope.row.exceptionDispose" placeholder="请选择">
+          <el-option
+            v-for="item in options"
+            :key="item.value"
+            :label="item.label"
+            :value="item.value"
+          >
+          </el-option>
+        </el-select>
+      </template>
+    </ele-pro-table>
+  </div>
+</template>
+
+<script>
+  import dictMixins from '@/mixins/dictMixins';
+  import {
+    getById,
+    update
+  } from '@/api/bpm/components/saleManage/exceptionManagement.js';
+  import { relationType } from '@/enum/dict.js';
+
+  export default {
+    mixins: [dictMixins],
+    props: {
+      businessId: {
+        default: ''
+      },
+      taskDefinitionKey: {}
+    },
+    data() {
+      return {
+        options: [
+          { label: '退货入库', value: 1 },
+          { label: '返工返修', value: 2 },
+          { label: '报损', value: 3 },
+          { label: '报废', value: 4 }
+        ],
+        form: {},
+        columns: [
+          {
+            width: 45,
+            type: 'index',
+            columnKey: 'index',
+            align: 'center',
+            fixed: 'left'
+          },
+          {
+            width: 220,
+            prop: 'exceptionDispose',
+            label: '处置方式',
+            slot: 'exceptionDispose',
+            fixed: 'left',
+            align: 'center',
+            headerSlot: 'headerExceptionDispose'
+          },
+          {
+            minWidth: 160,
+            prop: 'productCode',
+            label: '编码',
+            showOverflowTooltip: true,
+            align: 'center'
+          },
+          {
+            minWidth: 120,
+            prop: 'productName',
+            label: '名称',
+            showOverflowTooltip: true,
+            align: 'center'
+          },
+
+          {
+            minWidth: 160,
+            prop: 'batchNo',
+            label: '批次号',
+            showOverflowTooltip: true,
+            slot: 'batchNo',
+            align: 'center'
+          },
+          {
+            minWidth: 160,
+            prop: 'barcodes',
+            label: '发货条码',
+            showOverflowTooltip: true,
+            slot: 'barcodes',
+            align: 'center'
+          },
+          {
+            minWidth: 120,
+            prop: 'materielDesignation',
+            label: '物料代号',
+            showOverflowTooltip: true,
+            align: 'center'
+          },
+          {
+            minWidth: 120,
+            prop: 'clientCode',
+            label: '客户代号',
+            showOverflowTooltip: true,
+            align: 'center'
+          },
+          {
+            minWidth: 120,
+            prop: 'engrave',
+            label: '刻码',
+            showOverflowTooltip: true,
+            align: 'center'
+          },
+          {
+            minWidth: 160,
+            prop: 'packageNo',
+            align: 'center',
+            label: '包装编码',
+            showOverflowTooltip: true
+          },
+          {
+            minWidth: 100,
+            prop: 'packingQuantity',
+            align: 'center',
+            label: '包装数量',
+            showOverflowTooltip: true
+          },
+          {
+            minWidth: 120,
+            prop: 'packingUnit',
+            align: 'center',
+            label: '包装单位',
+            showOverflowTooltip: true
+          },
+          {
+            minWidth: 100,
+            prop: 'totalCount',
+            label: '计量数量',
+            showOverflowTooltip: true,
+            align: 'center'
+          },
+          {
+            minWidth: 150,
+            prop: 'measuringUnit',
+            label: '计量单位',
+            showOverflowTooltip: true,
+            align: 'center'
+          },
+          {
+            width: 160,
+            prop: 'pricingWay',
+            label: '计价方式',
+            slot: 'pricingWay',
+            align: 'center',
+            formatter: (row, column) => {
+              return row.pricingWay == 1
+                ? '按数量计费'
+                : row.pricingWay == 2
+                ? '按重量计费'
+                : '';
+            }
+          },
+          {
+            width: 100,
+            prop: 'singlePrice',
+            label: '单价',
+            slot: 'singlePrice',
+            align: 'center'
+          },
+
+          {
+            width: 100,
+            prop: 'totalPrice',
+            label: '合计',
+            align: 'center'
+          },
+
+          {
+            minWidth: 80,
+            prop: 'receiveTotalWeight',
+            label: '重量',
+            showOverflowTooltip: true,
+            align: 'center'
+          },
+          {
+            minWidth: 100,
+            prop: 'weightUnit',
+            label: '重量单位',
+            showOverflowTooltip: true,
+            align: 'center'
+          },
+
+          {
+            width: 220,
+            prop: 'describes',
+            label: '描述',
+            slot: 'describes',
+            align: 'center'
+          }
+        ]
+      };
+    },
+    created() {
+      this.getById(this.businessId);
+    },
+    methods: {
+      //获取订单详情
+      async getById(id) {
+        this.loading = true;
+        let data = await getById(id);
+        data['relationTypeName'] = relationType[data.relationType];
+
+        if (data) {
+          this.form = data;
+        }
+      },
+      async getTableValue() {
+        let is = false;
+        this.form.detailList.forEach((item) => {
+          if (!item.exceptionDispose) {
+            is = true;
+          }
+        });
+        if (is) {
+          this.$message.error('处置方式不能为空');
+          return;
+        }
+        return this.form;
+      }
+    }
+  };
+</script>
+<style scoped lang="scss"></style>

+ 147 - 0
src/views/bpm/handleTask/components/saleOrder/exceptionManagement/submit.vue

@@ -0,0 +1,147 @@
+<template>
+  <el-col :span="16" :offset="6">
+    <el-form label-width="100px" ref="formRef" :model="form">
+      <el-form-item
+        label="审批建议"
+        prop="reason"
+        style="margin-bottom: 20px"
+        :rules="{
+          required: true,
+          message: '请选择',
+          trigger: 'change'
+        }"
+      >
+        <el-input
+          type="textarea"
+          v-model="form.reason"
+          placeholder="请输入审批建议"
+        />
+      </el-form-item>
+    </el-form>
+    <div style="margin-left: 10%; margin-bottom: 20px; font-size: 14px">
+      <el-button
+        icon="el-icon-edit-outline"
+        type="success"
+        size="mini"
+        @click="handleAudit(1)"
+        >通过
+      </el-button>
+      <el-button
+        icon="el-icon-circle-close"
+        type="danger"
+        size="mini"
+        @click="handleAudit(0)"
+        >驳回
+      </el-button>
+    </div>
+  </el-col>
+</template>
+
+<script>
+  import { approveTaskWithVariables, rejectTask } from '@/api/bpm/task';
+  import {
+    update
+  } from '@/api/bpm/components/saleManage/exceptionManagement.js';
+  // 流程实例的详情页,可用于审批
+  export default {
+    name: '',
+    components: {
+      //   Parser
+    },
+    props: {
+      businessId: {
+        default: ''
+      },
+      taskId: {
+        default: ''
+      },
+      id: {
+        default: ''
+      },
+      taskDefinitionKey: {
+        default: ''
+      }
+    },
+    data() {
+      return {
+        isSaveLoading: false,
+        form: {
+          technicianId: '',
+          reason: ''
+        }
+      };
+    },
+    async created() {},
+    methods: {
+      /** 处理转办审批人 */
+      handleUpdateAssignee() {
+        this.$emit('handleUpdateAssignee');
+      },
+      /** 退回 */
+      handleBackList() {
+        this.$emit('handleBackList');
+      },
+
+      async handleAudit(status) {
+        const data = await this.getTableValue();
+        if (!data && !!status) {
+          return;
+        }
+        await update(data)
+        await this._approveTaskWithVariables(status);
+      },
+      async _approveTaskWithVariables(status) {
+        let variables = {
+          pass: !!status
+        };
+        let API = !!status ? approveTaskWithVariables : rejectTask;
+        API({
+          id: this.taskId,
+          reason: this.form.reason,
+          variables
+        }).then((res) => {
+          if (res.data.code != '-1') {
+            this.$emit('handleAudit', {
+              status,
+              title: status === 0 ? '驳回' : ''
+            });
+          }
+        });
+      },
+      getTableValue() {
+        return new Promise((resolve, reject) => {
+          this.$emit('getTableValue', async (data) => {
+            resolve(await data);
+          });
+        });
+      },
+
+      //更多
+      handleCommand(command) {
+        if (command === 'cancel') {
+          this.$confirm('是否确认作废?', {
+            type: 'warning',
+            cancelButtonText: '取消',
+            confirmButtonText: '确定'
+          })
+            .then(() => {
+              saleSendProcessCancel({
+                id: this.taskId,
+                reason: this.form.reason,
+                businessId: this.businessId
+              })
+                .then(() => {
+                  this.$emit('handleClose');
+                })
+                .catch(() => {
+                  this.$message.error('流程作废失败');
+                });
+            })
+            .catch(() => {});
+        }
+      }
+    }
+  };
+</script>
+
+<style lang="scss"></style>

+ 15 - 3
src/views/bpm/handleTask/components/saleOrder/invoiceConfirm/detailDialog.vue

@@ -88,9 +88,9 @@
 <!--                >-->
 <!--              </div>-->
             </el-form-item>
-            <el-form-item label="计价方式:" style="margin-bottom: 22px">
+            <!-- <el-form-item label="计价方式:" style="margin-bottom: 22px">
               {{ form.pricingWay == 1 ? '按数量计费' : '按重量计费' }}
-            </el-form-item>
+            </el-form-item> -->
           </el-col>
 
           <el-col :span="12">
@@ -437,7 +437,19 @@
             slot: 'remark',
             align: 'center'
           },
-         
+          {
+            width: 150,
+            prop: 'isException',
+            label: '收货状态',
+            slot: 'isException',
+            formatter: (row, column) => {
+              return row.isException == 1
+                ? '未收货'
+                : '已收货'
+            },
+            fixed: 'right',
+            align: 'center'
+          }
         ]
       };
     },

+ 6 - 24
src/views/bpm/handleTask/components/saleOrder/saleReturnGoods/detailDialog.vue

@@ -324,31 +324,13 @@
             slot: 'singlePrice',
             align: 'center'
           },
+          
+ 
           {
-            width: 100,
-            prop: 'taxRate',
-            label: '税率',
-            align: 'center'
-          },
-          {
-            minWidth: 120,
-            prop: 'materielDesignation',
-            label: '物料代号',
-            showOverflowTooltip: true,
-            align: 'center'
-          },
-          {
-            minWidth: 120,
-            prop: 'clientCode',
-            label: '客户代号',
-            showOverflowTooltip: true,
-            align: 'center'
-          },
-          {
-            minWidth: 120,
-            prop: 'engrave',
-            label: '刻码',
-            showOverflowTooltip: true,
+            width: 120,
+            prop: 'totalPrice',
+            label: '合计',
+            slot: 'totalPrice',
             align: 'center'
           },
           // {

+ 1 - 27
src/views/bpm/handleTask/components/saleOrder/saleReturnGoods/inventoryTable.vue

@@ -460,33 +460,7 @@
             slot: 'singlePrice',
             align: 'center'
           },
-          {
-            width: 100,
-            prop: 'taxRate',
-            label: '税率',
-            align: 'center'
-          },
-          {
-            minWidth: 120,
-            prop: 'materielDesignation',
-            label: '物料代号',
-            showOverflowTooltip: true,
-            align: 'center'
-          },
-          {
-            minWidth: 120,
-            prop: 'clientCode',
-            label: '客户代号',
-            showOverflowTooltip: true,
-            align: 'center'
-          },
-          {
-            minWidth: 120,
-            prop: 'engrave',
-            label: '刻码',
-            showOverflowTooltip: true,
-            align: 'center'
-          },
+    
           // {
           //   minWidth: 80,
           //   prop: 'weight',