Ver Fonte

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

001295 há 1 ano atrás
pai
commit
acc72622ec

+ 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 - 2
src/views/business/spd/target/targetTemplate/index.vue

@@ -10,6 +10,7 @@
                 <el-date-picker
                   v-model="queryParams.params.year"
                   type="year"
+                  value-format="yyyy"
                   clearable
                   >
                 </el-date-picker>
@@ -124,7 +125,7 @@ export default {
         pageNum: 1,
         pageSize: 10,
         params:{
-          year:null,
+          year: '',
         }
       },
       // 查询日期范围
@@ -201,6 +202,7 @@ export default {
         if (res.code === 200) {
           this.tableList = res.rows
           this.total = res.total
+          console.log(res, 'res---------')
         }
       })
     },
@@ -222,7 +224,7 @@ export default {
     },
     //搜索
     useSearch() {
-      console.log(this.queryParams);
+      console.log(this.queryParams, 'this.queryParams');
       this.getList(this.queryParams);
     },
     //重置

+ 1 - 1
src/views/material/changeApply/columns.js

@@ -19,7 +19,7 @@ export default function useColumns() {
     //   item: { key: "materialName", title: "物料名称" },
     //   attr: {},
     // },
-    { item: { key: "approver", title: "最后审批人" }, attr: {} },
+    { item: { key: "approverName", title: "最后审批人" }, attr: {} },
     { item: { key: "approvalTime", title: "最后审核时间" }, attr: {} },
     { item: { key: "createByName", title: "创建人" ,width:150, }, attr: {} },
     { item: { key: "createTime", title: "创建时间" }, attr: {} },

+ 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>

+ 18 - 4
src/views/purchase/DemandSummary/index.vue

@@ -283,14 +283,14 @@
           <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.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"/>
+                <el-input size="mini" :disabled="scope.row.status !== '1'|| lineDisable || scope.row.artificialAdjust == '0'" v-model="scope.row.modifyReason" @change="jilu(scope.$index)"/>
             </template>
           </el-table-column>
           <el-table-column show-overflow-tooltip v-if="showColumn.suggestionPurchase" label="建议采购量" align="center" prop="suggestionPurchase"  width="80px"/>
           <!-- <el-table-column show-overflow-tooltip v-if="showColumn.status" label="建议净采购量" align="center" prop="suggestBuyQty" width="100px"/> -->
           <el-table-column show-overflow-tooltip v-if="showColumn.finalBuyQty" label="最终采购量" align="center" prop="finalBuyQty" width="80px">
             <template slot-scope="scope">
-                <el-input size="mini" :disabled="scope.row.status !== '1' || lineDisable" v-model="scope.row.finalBuyQty"/>
+                <el-input size="mini" :disabled="scope.row.status !== '1' || lineDisable" v-model="scope.row.finalBuyQty" @change="jilu(scope.$index)"/>
             </template>
           </el-table-column>
           <el-table-column show-overflow-tooltip v-if="showColumn.materialClassifyTwoName" label="二级品类" align="center" prop="materialClassifyTwoName" width="120px"/>
@@ -504,6 +504,8 @@ export default {
       //   isPage: true,
       //   title: ''
       // }
+      // 用于保存临时记录修改行的数组
+      record:[]
     }
   },
   created() {
@@ -664,7 +666,15 @@ export default {
       this.getList(this.queryParams)
     },
     saveList() {
-      editSummaryList(this.tableList).then(res => {
+      // console.log('记录',this.record)
+      // 对记录的数据进行去重
+      let newRecord = Array.from(new Set(this.record))
+      // console.log('去重后的', newRecord)
+      let changeList = newRecord.map(i => {
+        return this.tableList[i]
+      })
+      // console.log('shuzu', changeList)
+      editSummaryList(changeList).then(res => {
         if (res.code === 200) {
           this.$modal.notifySuccess("保存成功");
           this.lineDisable = true
@@ -791,6 +801,7 @@ export default {
       }
       if (this.referCondition.title == '明细采购员') {
         console.log('选择进了吗',this.tableList)
+        this.record.push(this.tableIndex)
         this.tableList[this.tableIndex].buyer = selection[0].code
         this.tableList[this.tableIndex].buyerName = selection[0].name
       }
@@ -856,7 +867,10 @@ export default {
       this.referCondition.isPage = isPage
       this.referCondition.title = title
       this.$refs.refer.init(this.referCondition)
-    }
+    },
+    jilu(index) {
+      this.record.push(index)
+    },
   }
 }
 </script>

+ 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: '',

+ 6 - 0
src/views/purchase/purchase-order/column.js

@@ -546,6 +546,12 @@ export const TabColumns = [
         },
         
       },
+      { 
+        item:{key: "customerName", title: "收货客户" ,width:100,},
+        attr:{
+          isHidden:true,
+        },
+      },
       {
         item:{
           key: "isMedcine",

+ 19 - 0
src/views/purchase/purchase-order/edit/index.vue

@@ -56,6 +56,25 @@ export default {
       deep: true,
       immediate: true
     },
+    "params.billType":{
+      handler(nVal, oVal){
+
+        if((nVal === '21-Cxx-02' || nVal === '21-Cxx-04'  || nVal === '21-Cxx-10')){
+
+          this.rules.warehouseName = [
+            { required: true, message: "WMS入库仓库不能为空", trigger: "change" },
+          ];
+
+          this.rules.goodsAllocationName = [
+            { required: true, message: "货位不能为空", trigger: "change" },
+          ];
+        }else{
+          this.rules.warehouseName = null;
+          this.rules.goodsAllocationName = null;
+        }
+        this.count++;
+      }
+    },
   },
   methods: {
     setVisible(prop) {

+ 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",

+ 3 - 1
src/views/purchase/task/xie-yi-zhi-cai/index.vue

@@ -65,11 +65,13 @@ export default {
           this.data = data.map((item) => ({
             ...item,
             orderPriceVos: item.orderPriceVos.map((cItem) => ({
-              ...item,
+              // ...item,
               ...cItem,
               purchaseQuantity: item.orderPriceVos.length === 1 ? (item.puQty - item.executeQty) : undefined
             })),
           }));
+
+          console.log(this.data,'this.data');
           return true;
         } else {
           return false;

+ 169 - 0
src/views/purchase/workSpace/index.vue

@@ -0,0 +1,169 @@
+<template>
+  <div id="workSpace">
+    <el-card style="position: relative;">
+      <el-form label-width="100px">
+        <el-row :gutter="10">
+          <el-col :span="1.5">
+              <el-form-item label="单据标题">
+                <el-input
+                  v-model.trim="queryParams.docSubject"
+                  size="mini"
+                  clearable
+                  style="width: 200px"
+                />
+              </el-form-item>
+            </el-col>
+
+          <el-col :span="1.5">
+              <el-form-item label="单据类型">
+                <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>
+            </el-col>
+        </el-row>
+      </el-form>
+
+      <div style="position: absolute;top: 18px;right: 10px;">
+        <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-pagination
+        background
+        @size-change="handleSizeChange"
+        @current-change="handleCurrentChange"
+        :current-page="queryParams.pageNum"
+        :page-sizes="[10, 20, 50, 100, 200, 500]"
+        :page-size="20"
+        layout="total, sizes, prev, pager, next, jumper"
+        :total=total>
+      </el-pagination>
+
+    </el-card>
+  </div>
+</template>
+
+<script>
+import { getWorkSpaceList } from '@/api/purchase/workSpace.js'
+export default {
+  name: 'workSpace',
+  dicts: ['oa_templete_id'],
+  data() {
+    return {
+      queryParams: {
+        modelIds:[],
+        docSubject: '',
+        pageNum: 1,
+        pageSize: 20
+      },
+      loading: false,
+      tableList: [],
+      total: 0
+    }
+  },
+  created() {
+    this.getList(this.queryParams)
+  },
+  methods: {
+    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(row) {
+      console.log(row)
+      this.$router.push({path: row.linkUrl ,query: {billCode: row.billCode}})
+    },
+    agree(row) {
+      
+    },
+    handleSizeChange(val) {
+      this.queryParams.pageSize = val
+      this.getList(this.queryParams)
+    },
+    handleCurrentChange(val) {
+      this.queryParams.pageNum = val
+      this.getList(this.queryParams)
+    },
+  }
+}
+</script>
+
+<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;
+}
+.el-pagination {
+  margin-top: 10px;
+  text-align: right;
+}
+</style>
+<style>
+.exporttable {
+  border: solid 1px #c0c0c0;
+}
+.el-table .el-table__header-wrapper th {
+  font-size: 14px;
+}
+</style>