Эх сурвалжийг харах

Merge branch 'purchaseDev' into 'dev'

Purchase dev

See merge request new-business/drp-web!415
黄梓星 1 жил өмнө
parent
commit
bebe65c195

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

@@ -0,0 +1,10 @@
+import request from '@/utils/request'
+
+// 工作台列表
+export function getWorkSpaceList(data) {
+  return request({
+    url: `oaflow/list?pageSize=${data.pageSize}&pageNum=${data.pageNum}`,
+    method: 'post',
+    data: data
+  })
+}

+ 4 - 4
src/views/material/changeApply/index.vue

@@ -58,15 +58,15 @@
         >
           <el-table-column fixed="right" label="操作" width="150" align="center">
             <template slot-scope="scope">
-              <el-button type="text" size="small" @click="useSee(scope.row)">查看</el-button>
+              <el-button type="text" size="small" @click.stop="useSee(scope.row)">查看</el-button>
               <el-button  
                 v-if="scope.row.oaId && scope.row.oaId !=''" 
-                @click="jumpFlow(scope.row)" 
+                @click.stop="jumpFlow(scope.row)" 
                 type="text"
                 :size="size"
               >流程跳转</el-button>
-              <el-button @click="handleEdit(scope.row)" v-if="scope.row.status == 0 || scope.row.status == 3" type="text" size="small">编辑</el-button>
-              <el-button type="text" size="small" @click="deleteRow(scope.row)" v-if="scope.row.status == 0 || scope.row.status == 3">删除</el-button>
+              <el-button @click.stop="handleEdit(scope.row)" v-if="scope.row.status == 0 || scope.row.status == 3" type="text" size="small">编辑</el-button>
+              <el-button type="text" size="small" @click.stop="deleteRow(scope.row)" v-if="scope.row.status == 0 || scope.row.status == 3">删除</el-button>
             </template>
           </el-table-column>
         </el-super-table>

+ 6 - 0
src/views/material/requisition/add.vue

@@ -1270,6 +1270,8 @@
           if (res.code === 200) {
 
             this.basicForm = res.data;
+            const { id, name, nickName, } =
+            this.$store.state.user;
 
             if (this.pageStu === 'copy') {
 
@@ -1300,6 +1302,10 @@
               this.basicForm.updateTime = '';
 
               this.basicForm.auditTime = '';
+
+              this.basicForm.proposerName = nickName;
+
+              this.basicForm.proposerId = name;
               
               this.basicForm.applyBillInfo.auditTime = '';
 

+ 50 - 16
src/views/material/requisition/columns.js

@@ -116,14 +116,14 @@
         clearable: true,
       },
     },
-    {
-      item: { key: "createTimeString", title: "申请时间" },
-      attr: {
-        is: "el-date-picker", 
-        valueFormat: "yyyy-MM-dd" ,
-        clearable: true,
-      },
-    },
+    // {
+    //   item: { key: "createTimeString", title: "申请时间" },
+    //   attr: {
+    //     is: "el-date-picker", 
+    //     valueFormat: "yyyy-MM-dd" ,
+    //     clearable: true,
+    //   },
+    // },
     {
       item: { key: "reviewedName", title: "最后审批人" },
       attr: {
@@ -136,14 +136,14 @@
         clearable: true,
       },
     },
-    {
-      item: { key: "auditTimeString", title: "审批时间" },
-      attr: {
-        is: "el-date-picker", 
-        valueFormat: "yyyy-MM-dd" ,
-        clearable: true,
-      },
-    },
+    // {
+    //   item: { key: "auditTimeString", title: "审批时间" },
+    //   attr: {
+    //     is: "el-date-picker", 
+    //     valueFormat: "yyyy-MM-dd" ,
+    //     clearable: true,
+    //   },
+    // },
     {
       item: { key: "manufacturerName", title: "生产厂家/代理人" },
       attr: {
@@ -163,6 +163,40 @@
         is: "el-input",
       },
     },
+    {
+      item:{
+        key: "createTimeString",
+        title: "申请时间",
+        span:12,
+      },
+      attr: {
+        clearable:true,
+        // is: "el-date-wrapper",
+        is: "el-date-picker",
+        type:"daterange",
+        rangeSeparator:"-",
+        startPlaceholder:"开始日期",
+        endPlaceholder:"结束日期",
+        valueFormat:"yyyy-MM-dd",
+      },
+    },
+    
+    {
+      item:{
+        key: "auditTimeString",
+        title: "审批时间",
+        span:12,
+      },
+      attr: {
+        clearable:true,
+        is: "el-date-picker",
+        type:"daterange",
+        rangeSeparator:"-",
+        startPlaceholder:"开始日期",
+        endPlaceholder:"结束日期",
+        valueFormat:"yyyy-MM-dd",
+      },
+    },
     
   
   ].map(({ item, attr }) => ({

+ 4 - 4
src/views/material/requisition/index.vue

@@ -89,16 +89,16 @@
               <el-button 
                 type="text" 
                 :size="size" 
-                @click="check(scope.row)"
+                @click.stop="check(scope.row)"
               >查看</el-button>
               <el-button 
-                @click="edit(scope.row)" 
+                @click.stop="edit(scope.row)" 
                 v-if="scope.row.status == 0 || scope.row.status == 3" 
                 type="text"
                 :size="size"
               >编辑</el-button>
               <el-button 
-                @click="jumpFlow(scope.row)" 
+                @click.stop="jumpFlow(scope.row)" 
                 v-if="scope.row.oaId && scope.row.oaId !=''" 
                 type="text"
                 :size="size"
@@ -106,7 +106,7 @@
               <el-button 
                 type="text" 
                 :size="size"
-                @click="deleteRow(scope.row)"
+                @click.stop="deleteRow(scope.row)"
                 v-if="scope.row.status == 0 || scope.row.status == 3"
               >删除</el-button>
             </template>

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

@@ -366,7 +366,7 @@ export default {
       // 页面状态
       page: '',
       queryParams: {
-        code: '',
+        code: this.$route.query.billCode,
         customer: '',
         isCustomerSpecified: '',
         demandPersonal: '',

+ 35 - 5
src/views/purchase/task/columns.js

@@ -113,14 +113,24 @@ export default function useColumns() {
       },
     },
     {
-      item: {
-        key: "materialDesc",
-        title: "物料描述",
+      item: { 
+        key: "existPrice", 
+        title: "是否有价格",
       },
-      attr: {
-        is: "el-input",
+      attr: { 
+        is: "el-select", 
+        dictName: "sys_true_false" 
       },
     },
+    // {
+    //   item: {
+    //     key: "materialDesc",
+    //     title: "物料描述",
+    //   },
+    //   attr: {
+    //     is: "el-input",
+    //   },
+    // },
     {
       item: {
         key: "code",
@@ -200,6 +210,26 @@ export default function useColumns() {
         valueKey: "name",
       },
     },
+    // {
+    //   item: { 
+    //     key: "", 
+    //     title: "紧急标识",
+    //   },
+    //   attr: { 
+    //     is: "el-select", 
+    //     dictName: "sys_yes_no" 
+    //   },
+    // },
+    // {
+    //   item: { 
+    //     key: "", 
+    //     title: "补单标识",
+    //   },
+    //   attr: { 
+    //     is: "el-select", 
+    //     dictName: "sys_yes_no" 
+    //   },
+    // },
     {
       item: {
         key: "documentsCodes",

+ 92 - 10
src/views/purchase/workSpace/index.vue

@@ -6,7 +6,7 @@
           <el-col :span="1.5">
               <el-form-item label="单据标题">
                 <el-input
-                  v-model.trim="queryParams.title"
+                  v-model.trim="queryParams.docSubject"
                   size="mini"
                   clearable
                   style="width: 200px"
@@ -16,8 +16,8 @@
 
           <el-col :span="1.5">
               <el-form-item label="单据类型">
-                <el-select multiple v-model="queryParams.rowStatus" size="mini" style="width: 200px" clearable>
-                  <el-option v-for="dict in dict.type.sys_row_status" :key="dict.value" :label="dict.label" :value="dict.value">
+                <el-select multiple v-model="queryParams.modelIds" size="mini" style="width: 200px" clearable>
+                  <el-option v-for="dict in dict.type.oa_templete_id" :key="dict.value" :label="dict.label" :value="dict.value">
                   </el-option>
                 </el-select>
               </el-form-item>
@@ -29,34 +29,116 @@
         <el-button type="primary" size="mini" @click="searchList">搜索</el-button>
         <el-button size="mini" plain @click="resetList">重置</el-button>
       </div>
+
+      <div class="btn_grooup">
+        <el-button type="primary" size="mini" @click="xxxx">批量同意</el-button>
+      </div>
+
+      <el-table
+        v-loading="loading"
+        :data="tableList" 
+        fit
+        :cell-style="{ borderColor: '#c0c0c0' }"
+        :header-cell-style="{ borderColor: '#c0c0c0' }"
+        class="exporttable"
+        max-height="410"
+        border
+        highlight-current-row
+        style="font-size: 12px;"
+        @selection-change="handleSelectionChange"
+        @row-click="rowSelect"
+        @row-dblclick="doubleClick"
+        ref="tables"
+      >
+        <el-table-column type="selection" width="55" />
+        <el-table-column label="序号" type="index" align="center" width="50px"/>
+        <el-table-column show-overflow-tooltip label="标题" align="center" prop="docSubject"/>
+        <el-table-column show-overflow-tooltip label="创建人" align="center" prop="docCreate"/>
+        <el-table-column
+          fixed="right"
+          label="操作"
+          align="center"
+          width="180"
+          >
+          <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>
+          </template>
+        </el-table-column>
+      </el-table>
+
     </el-card>
   </div>
 </template>
 
 <script>
+import { getWorkSpaceList } from '@/api/purchase/workSpace.js'
 export default {
   name: 'workSpace',
-  dicts: ['sys_row_status'],
+  dicts: ['oa_templete_id'],
   data() {
     return {
       queryParams: {
-        rowStatus:['1'],
-        title: ''
-      }
+        modelIds:[],
+        docSubject: '',
+        pageNum: 1,
+        pageSize: 10
+      },
+      loading: false,
+      tableList: [],
+      total: 0
     }
   },
+  created() {
+    this.getList(this.queryParams)
+  },
   methods: {
-    searchList() {},
+    getList(params){
+      getWorkSpaceList(params).then(res => {
+        if (res.code === 200) {
+          this.tableList = res.rows
+          this.total = res.total
+        }
+      }).then(() => {
+        this.loading = false
+      }).catch(err => {
+        this.loading = false
+      })
+    },
+    searchList() {
+      this.getList(this.queryParams)
+    },
     resetList() {},
+    handleSelectionChange() {},
+    rowSelect() {},
+    doubleClick() {},
+    xxxx() {},
+    check() {},
+    agree(row) {
+      console.log(row)
+      this.$router.push({path: row.linkUrl ,query: {billCode: row.billCode}})
+    }
   }
 }
 </script>
 
-<style lang="scss">
+<style lang="scss" scoped>
 #workSpace {
   padding: 12px;
   box-sizing: border-box;
   overflow-y: scroll;
 }
-  
+.btn_grooup {
+  margin-bottom: 10px;
+  display: flex;
+  justify-content: flex-end;
+}
+</style>
+<style>
+.exporttable {
+  border: solid 1px #c0c0c0;
+}
+.el-table .el-table__header-wrapper th {
+  font-size: 14px;
+}
 </style>