chris há 3 anos atrás
pai
commit
e3b1692a80

+ 4 - 3
src/api/util.js

@@ -6,18 +6,19 @@
 export function dealStepData (list, stepList) {
   if (list) {
     stepList.push({
-      icon: 'el-icon-location-outline',
+      icon: 'el-icon-location',
       title: '开始'
     })
     list.forEach((item) => {
       stepList.push({
-        icon: item.approvalState === '0' ? 'el-icon-location' : 'el-icon-location-outline',
+        // icon: item.approvalState === '0' ? 'el-icon-location' : 'el-icon-location-outline',
+        icon: 'el-icon-location',
         title: item.stepName
         // description: formatStepDesc(item.processLogInfoList)
       })
     })
     stepList.push({
-      icon: 'el-icon-location-outline',
+      icon: 'el-icon-location',
       title: '结束'
     })
   }

+ 18 - 18
src/views/modules/cus/contract-add-or-update.vue

@@ -5,21 +5,25 @@
       width="70%"
       :close-on-click-modal="false"
       :visible.sync="visible">
-      <el-steps v-if="display" :active="1" align-center style="margin-bottom: 20px">
-        <template v-for="(item, i) in stepList">
-          <el-step :icon="item.icon" :title="item.title" :description="item.description"></el-step>
-        </template>
-      </el-steps>
-      <el-collapse v-if="display" style="margin-bottom: 20px">
-        <el-collapse-item>
-          <template slot="title">
-            <span style="color: red">审批日志(展开查看更多):</span>
+      <!-- 工作流 -->
+      <div v-show="display">
+        <el-steps :active="dataForm.workFlowBusinessExt.workFlowProcessStepList.length + 2" align-center style="margin-bottom: 20px">
+          <template v-for="(item, i) in stepList">
+            <el-step :icon="item.icon" :title="item.title" :description="item.description"></el-step>
           </template>
-          <template v-for="(item, i) in logList">
-            <div>{{++i}}:{{item.approverName}}  {{item.createTime}}  {{item.approvalValue}}</div>
-          </template>
-        </el-collapse-item>
-      </el-collapse>
+        </el-steps>
+        <el-collapse style="margin-bottom: 20px">
+          <el-collapse-item>
+            <template slot="title">
+              <span style="color: red">审批日志(展开查看更多):</span>
+            </template>
+            <template v-for="(item, i) in logList">
+              <div>{{++i}}:{{item.approverName}}  {{item.createTime}}  {{item.approvalValue}}</div>
+            </template>
+          </el-collapse-item>
+        </el-collapse>
+      </div>
+      <!-- 表单 -->
       <el-form :model="dataForm" :rules="dataRule" ref="dataForm" label-width="auto">
         <el-row class="my-row">
           <el-col :span="8">
@@ -91,10 +95,6 @@
         <el-button v-if="!display" type="primary" @click="dataFormSubmit()">确定</el-button>
       </span>
     </el-dialog>
-    <!-- 图片预览 -->
-    <el-dialog title="图片预览" :visible.sync="previewVisible" width="50%">
-      <img :src="previewPath" :alt="previewName" style="width:100%;height:100%" />
-    </el-dialog>
   </div>
 </template>
 

+ 28 - 1
src/views/modules/order/order-add-or-update.vue

@@ -5,6 +5,25 @@
       width="70%"
       :close-on-click-modal="false"
       :visible.sync="visible">
+      <!-- 工作流 -->
+      <div v-show="display">
+        <el-steps :active="dataForm.workFlowBusinessExt.workFlowProcessStepList.length + 2" align-center style="margin-bottom: 20px">
+          <template v-for="(item, i) in stepList">
+            <el-step :icon="item.icon" :title="item.title" :description="item.description"></el-step>
+          </template>
+        </el-steps>
+        <el-collapse style="margin-bottom: 20px">
+          <el-collapse-item>
+            <template slot="title">
+              <span style="color: red">审批日志(展开查看更多):</span>
+            </template>
+            <template v-for="(item, i) in logList">
+              <div>{{++i}}:{{item.approverName}}  {{item.createTime}}  {{item.approvalValue}}</div>
+            </template>
+          </el-collapse-item>
+        </el-collapse>
+      </div>
+      <!-- 表单 -->
       <el-form :model="dataForm" :rules="dataRule" ref="dataForm" label-width="auto">
         <el-row class="my-row">
           <el-col :span="8">
@@ -159,6 +178,7 @@
   import UserComponent from '../common/user-component'
   import {toNumber, toPercent} from '@/utils/common'
   import UploadComponent from '../common/upload-component'
+  import { dealStepData, dealStepLogs } from '@/api/util'
 
   export default {
     name: 'order-add-or-update',
@@ -184,12 +204,16 @@
           customerId: [{ required: true, message: '客户名称不能为空', trigger: 'change' }],
           salesmanId: [{ required: true, message: '业务员不能为空', trigger: 'change' }],
           contactDate: [{ required: true, message: '合同交期不能为空', trigger: 'change' }]
-        }
+        },
+        stepList: [],
+        logList: []
       }
     },
     methods: {
       async init (id, display) {
         this.fileList = []
+        this.stepList = []
+        this.logList = []
         this.dataForm = {
           rateVal: 0
         }
@@ -201,6 +225,9 @@
         await getOrderDetail(this.id).then(({data}) => {
           if (data && data.code === '200') {
             this.dataForm = data.data
+            // 流程图展示
+            dealStepData(data.data.workFlowBusinessExt.workFlowProcessStepList, this.stepList)
+            dealStepLogs(data.data.workFlowBusinessExt.processLogList, this.logList)
             // 附件
             if (data.data.attachList) {
               data.data.attachList.forEach((item) => {

+ 4 - 4
src/views/modules/sale/add-material.vue

@@ -1,7 +1,7 @@
 <template>
   <div>
     <el-dialog
-      :title="!id ? '新增': display ? '详情' : '修改'"
+      :title="!id ? '新增': display ? '详情' : '新增或修改'"
       width="50%"
       :close-on-click-modal="false"
       :visible.sync="visible">
@@ -19,10 +19,10 @@
           <el-input v-model="dataForm.unitName" :disabled="display" placeholder="单位"></el-input>
         </el-form-item>
         <el-form-item label="不含税单价" prop="price">
-          <el-input-number v-model="dataForm.price" :disabled="display" :precision="2" :step="1" :min="0"/>
+          <el-input-number v-model="dataForm.price" :disabled="display" :precision="1" :step="1" :min="0"/>
         </el-form-item>
         <el-form-item label="含税单价" prop="taxPrice">
-          <el-input-number v-model="dataForm.taxPrice" :disabled="display" :precision="2" :step="1" :min="0"/>
+          <el-input-number v-model="dataForm.taxPrice" :disabled="display" :precision="1" :step="1" :min="0"/>
         </el-form-item>
         <el-form-item label="含税总价" prop="taxAmount">
           <span>{{ (dataForm.cnt*dataForm.taxPrice).toFixed(2) }}</span>
@@ -32,7 +32,7 @@
           %
         </el-form-item>
         <el-form-item label="备注" prop="notes">
-          <el-input v-model="dataForm.notes" :disabled="display" placeholder="备注"></el-input>
+          <el-input type="textarea" v-model="dataForm.notes" :disabled="display" placeholder="备注"></el-input>
         </el-form-item>
       </el-form>
       <span slot="footer" class="dialog-footer">

+ 2 - 1
src/views/modules/sale/purchase-add-or-update.vue

@@ -66,7 +66,7 @@
         </el-row>
         <el-row class="my-row">
           <el-form-item label="备注" prop="notes">
-            <el-input v-model="dataForm.notes" :disabled="display" placeholder="备注"></el-input>
+            <el-input type="textarea" v-model="dataForm.notes" :disabled="display"></el-input>
           </el-form-item>
         </el-row>
         <div class="title"><span style="color: red">*</span> 采购物品明细</div>
@@ -227,6 +227,7 @@
         await getPurchaseDetail(this.id).then(({data}) => {
           if (data && data.code === '200') {
             this.dataForm = data.data
+            // todo 工作流赋值
             // 获取采购物品明细
             if (data.data.details) {
               this.materialDetails = []

+ 30 - 1
src/views/modules/tech/product-add-or-update.vue

@@ -5,6 +5,25 @@
         width="70%"
         :close-on-click-modal="false"
         :visible.sync="visible">
+        <!-- 工作流 -->
+        <div v-show="display && dataForm.workFlowBusinessExt">
+          <el-steps :active="dataForm.workFlowBusinessExt?dataForm.workFlowBusinessExt.workFlowProcessStepList.length + 2:0" align-center style="margin-bottom: 20px">
+            <template v-for="(item, i) in stepList">
+              <el-step :icon="item.icon" :title="item.title" :description="item.description"></el-step>
+            </template>
+          </el-steps>
+          <el-collapse style="margin-bottom: 20px">
+            <el-collapse-item>
+              <template slot="title">
+                <span style="color: red">审批日志(展开查看更多):</span>
+              </template>
+              <template v-for="(item, i) in logList">
+                <div>{{++i}}:{{item.approverName}}  {{item.createTime}}  {{item.approvalValue}}</div>
+              </template>
+            </el-collapse-item>
+          </el-collapse>
+        </div>
+        <!-- 表单 -->
         <el-form :model="dataForm" :rules="dataRule" ref="dataForm" label-width="auto">
           <el-row class="my-row">
             <el-col :span="8">
@@ -206,6 +225,7 @@
   import { getProductDetail, getTechList, getDrawList } from '@/api/product'
   import { getCusList } from '@/api/cus'
   import UploadComponent from '../common/upload-component'
+  import { dealStepData, dealStepLogs } from '@/api/util'
 
   export default {
     name: 'product-add-or-update',
@@ -244,12 +264,16 @@
           productType: [{ required: true, message: '产品类别不能为空', trigger: 'change' }],
           source: [{ required: true, message: '产品来源不能为空', trigger: 'change' }],
           drawingIdList: [{ required: true, message: '产品图纸不能为空', trigger: 'blur' }]
-        }
+        },
+        stepList: [],
+        logList: []
       }
     },
     methods: {
       async init (id, display) {
         this.fileList = []
+        this.stepList = []
+        this.logList = []
         this.dataForm = {}
         this.productDetails = []
         this.materialList = []
@@ -270,6 +294,11 @@
         await getProductDetail(this.id).then(({data}) => {
           if (data && data.code === '200') {
             this.dataForm = data.data
+            // 流程图展示
+            if (data.data.workFlowBusinessExt) {
+              dealStepData(data.data.workFlowBusinessExt.workFlowProcessStepList, this.stepList)
+              dealStepLogs(data.data.workFlowBusinessExt.processLogList, this.logList)
+            }
             // 组合小产品
             data.data.composeProductMaterialList.forEach((item) => {
               this.productDetails.push(item)