Browse Source

Merge remote-tracking branch 'origin/dev' into dev

001295 1 year ago
parent
commit
9dbe0a83a9

+ 16 - 0
src/api/purchase/workSpace.js

@@ -7,4 +7,20 @@ export function getWorkSpaceList(data) {
     method: 'post',
     data: data
   })
+}
+// 工作台审批
+export function auditWork(data) {
+  return request({
+    url: `oaflow/approve`,
+    method: 'post',
+    data: data
+  })
+}
+// 统一所有页面的收回流程接口
+export function rebacktWork(data) {
+  return request({
+    url: `oaflow/rollback`,
+    method: 'post',
+    data: data
+  })
 }

+ 7 - 0
src/components/popover-select/components/MATERIAL_PARAM.js

@@ -22,6 +22,7 @@ export default [
   {
     item: { key: "registrationNo", title: "注册证号", width: "auto" },
     attr: {
+      type:'ComputedInput',
       formatter: (prop) => {
         return prop.materialMedcine.registrationNo;
       },
@@ -30,6 +31,7 @@ export default [
   {
     item: { key: "isDrug", title: "物料药品属性", width: "auto" },
     attr: {
+      type:'ComputedInput',
       formatter: (prop) => {
         return prop.materialMedcine.isDrug == "0" ? "Y" : "N";
       },
@@ -38,6 +40,7 @@ export default [
   {
     item: { key: "isDrugNumber", title: "药品", width: "auto" },
     attr: {
+      type:'ComputedInput',
       formatter: (prop) => {
         return prop.materialMedcine.isDrug;
       },
@@ -58,6 +61,7 @@ export default [
   {
     item: { key: "dosageFrom", title: "剂型", width: "auto" },
     attr: {
+      type:'ComputedInput',
       formatter: (prop) => {
         return prop.materialMedcine.dosageFrom;
       },
@@ -66,6 +70,7 @@ export default [
   {
     item: { key: "dosageFromName", title: "剂型名称", width: "auto" },
     attr: {
+      type:'ComputedInput',
       formatter: (prop) => {
         return prop.materialMedcine.dosageFromName;
       },
@@ -74,6 +79,7 @@ export default [
   {
     item: { key: "curingType", title: "养护类型", width: "auto" },
     attr: {
+      type:'ComputedInput',
       formatter: (prop) => {
         return prop.materialMedcine.curingType;
       },
@@ -82,6 +88,7 @@ export default [
   {
     item: { key: "medicalInstruments", title: "医疗器械", width: "auto" },
     attr: {
+      type:'ComputedInput',
       formatter: (prop) => {
         return prop.materialMedcine.medicalInstruments;
       },

+ 1 - 0
src/components/popover-select/components/TAX_RATE_PARAM.js

@@ -11,6 +11,7 @@ export default [
   {
     item: { key: "ntaxrate", title: "税率%", width: "auto" },
     attr: {
+      type:'ComputedInput',
       formatter: (prop) => {
         return Number(prop.ntaxrate === "0E-8" ? 0 : prop.ntaxrate).toFixed(6);
       },

+ 1 - 1
src/components/popover-select/index.vue

@@ -315,7 +315,7 @@ export default {
                 v-if="attr.type === 'ComputedInput'"
                 v-model="scope.row[item.key]"
                 :source="scope.row"
-                :computed="attr.computed"
+                :formatter="attr.formatter"
                 :placeholder="attr.placeholder"
                 style="width: 100%"
               ></dr-computed-input>

+ 5 - 1
src/views/purchase/DemandSummary/index.vue

@@ -280,7 +280,11 @@
           <el-table-column show-overflow-tooltip v-if="showColumn.minPackage" label="最小包装量" align="center" prop="minPackage"  width="80px"/>
           <el-table-column show-overflow-tooltip v-if="showColumn.minOrder" label="最小订货量" align="center" prop="minOrder"  width="80px"/>
           <el-table-column show-overflow-tooltip v-if="showColumn.minBatch" label="最小批量" align="center" prop="minBatch"  width="80px"/>
-          <el-table-column show-overflow-tooltip v-if="showColumn.artificialAdjust" label="人工调整数" align="center" prop="artificialAdjust" width="80px"/>
+          <el-table-column show-overflow-tooltip v-if="showColumn.artificialAdjust" label="人工调整数" align="center" prop="artificialAdjust" width="80px">
+            <template slot-scope="scope">
+              {{scope.row.artificialAdjust = scope.row.finalBuyQty - scope.row.suggestionPurchase}}
+            </template>
+          </el-table-column>
           <el-table-column show-overflow-tooltip v-if="showColumn.modifyReason" label="修改原因" align="center" prop="modifyReason" width="150px">
             <template slot-scope="scope">
                 <el-input size="mini" :disabled="scope.row.status !== '1'|| lineDisable || scope.row.artificialAdjust == '0'" v-model="scope.row.modifyReason" @change="jilu(scope.$index)"/>

+ 10 - 1
src/views/purchase/PurchaseDemandList/index.vue

@@ -209,6 +209,7 @@
             <el-button type="text" size="mini" @click="check(scope.row)">查看</el-button>
             <el-button type="text" size="mini" v-if="scope.row.status == '0' || scope.row.status == '3'" @click="edit(scope.row)">编辑</el-button>
             <el-button type="text" size="mini" v-if="scope.row.status == '0' || scope.row.status == '3'" @click="commit(scope.row)">提交</el-button>
+            <el-button type="text" size="mini" v-if="scope.row.status == '1' && scope.row.flowId" @click="reback(scope.row)">收回</el-button>
             <el-button type="text" size="mini" v-if="scope.row.status == '0' || scope.row.status == '3'" @click="deleteids(scope.row)">删除</el-button>
           </template>
         </el-table-column>
@@ -317,6 +318,8 @@ import Add from './add.vue'
 import Refers from '@/components/Refers/refers.vue'
 import TreeRefers from '@/components/Refers/treeRefer.vue'
 import CollapseTransition from '@/components/MyCollapse/collapse.vue'
+// 流程收回
+import { rebacktWork } from '@/api/purchase/workSpace.js'
 import {getDemandList, delDemand, downLoadDemand, exportDemand, submitDemand } from '@/api/purchase/purchaseDemand.js'
 export default {
   name: 'PurchaseDemandList',
@@ -660,6 +663,12 @@ export default {
         this.$modal.closeLoading();
       })
     },
+    // 流程收回
+    reback(row) {
+      rebacktWork().then(res => {
+
+      })
+    },
     // 行内删除
     deleteids(row) {
       console.log('row', row)
@@ -678,7 +687,7 @@ export default {
         this.$modal.notifyWarning("请选中至少一条数据");
       } else {
         let param = this.ids.join()
-        this.$modal.confirm('确认信息').then(() => {
+        this.$modal.confirm('确认删除选中数据?').then(() => {
         delDemand(param).then(res => {
           if (res.code === 200) {
             this.$modal.notifySuccess("删除成功");

+ 1 - 0
src/views/purchase/apply/index.vue

@@ -50,6 +50,7 @@
     },
     computed: {},
     created() {
+      this.params.priceCode = this.$route.query.billCode
       this.useQuery(this.params, this.page);
     },
     methods: {

+ 1 - 1
src/views/purchase/purchase-order/add/column.js

@@ -935,7 +935,7 @@ export const TabColumns = [
           materialManufacturersCode:'manufacturersMaterialCode',
           specification:'specification',
           model:'model',
-          isMedcine:'isMedicineValue',
+          isMedcine:'isMedicine',
           manufacturer:'manufacturerId',
           manufacturerName:'manufacturerIdName',
           unit:'unitId',

+ 56 - 11
src/views/purchase/workSpace/index.vue

@@ -31,7 +31,7 @@
       </div>
 
       <div class="btn_grooup">
-        <el-button type="primary" size="mini" @click="xxxx">批量同意</el-button>
+        <el-button type="primary" size="mini" @click="audits">批量审批</el-button>
       </div>
 
       <el-table
@@ -62,7 +62,7 @@
           >
           <template slot-scope="scope">
             <el-button type="text" size="mini" @click="check(scope.row)">查看</el-button>
-            <el-button type="text" size="mini" @click="agree(scope.row)">同意</el-button>
+            <el-button type="text" size="mini" @click="audit(scope.row)">审批</el-button>
           </template>
         </el-table-column>
       </el-table>
@@ -83,7 +83,7 @@
 </template>
 
 <script>
-import { getWorkSpaceList } from '@/api/purchase/workSpace.js'
+import { getWorkSpaceList, auditWork } from '@/api/purchase/workSpace.js'
 export default {
   name: 'workSpace',
   dicts: ['oa_templete_id'],
@@ -97,7 +97,8 @@ export default {
       },
       loading: false,
       tableList: [],
-      total: 0
+      total: 0,
+      ids: []
     }
   },
   created() {
@@ -119,17 +120,61 @@ export default {
     searchList() {
       this.getList(this.queryParams)
     },
-    resetList() {},
-    handleSelectionChange() {},
-    rowSelect() {},
-    doubleClick() {},
-    xxxx() {},
+    resetList() {
+      this.queryParams = {
+        modelIds:[],
+        docSubject: '',
+        pageNum: 1,
+        pageSize: 20
+      }
+      this.searchList()
+    },
+    handleSelectionChange(selection) {
+      console.log('选中', selection)
+      this.ids = selection
+      // console.log('选中数组', this.ids.join())
+    },
+    rowSelect(row) {
+      this.$refs.tables.toggleRowSelection(row);
+    },
+    doubleClick(row) {
+      this.check(row)
+    },
+    audits() {
+      if(this.ids.length == 0) {
+        this.$modal.notifyWarning("请选中至少一条数据");
+      } else {
+        this.$modal.confirm('确认审批选中单据?').then(() => {
+        this.$modal.loading("审批中...");
+        auditWork(this.ids).then(res => {
+          if (res.code === 200) {
+            this.$modal.closeLoading();
+            this.$modal.notifySuccess("审批成功");
+            this.searchList()
+          }
+        })
+        }).catch(() => {
+          this.$modal.closeLoading();
+          this.searchList()
+        })
+      } 
+    },
     check(row) {
       console.log(row)
       this.$router.push({path: row.linkUrl ,query: {billCode: row.billCode}})
     },
-    agree(row) {
-      
+    audit(row) {
+      this.$modal.loading("审批中...");
+      auditWork([row]).then(res => {
+        if(res.code === 200) {
+          this.$modal.closeLoading();
+          this.$modal.notifySuccess("审批成功");
+          this.searchList()
+        }
+      }).catch(() => {
+        this.$modal.closeLoading();
+        this.searchList()
+      })
     },
     handleSizeChange(val) {
       this.queryParams.pageSize = val