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

1.采购订单列表单据状态调整靠前,经营性项目,在建工程项目,处理方式,退换原因展示名称
2.处理发送NC之后,刷新页面
3.更换分页组件

002390 2 жил өмнө
parent
commit
bb168cd028

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

@@ -210,7 +210,7 @@ export default {
       }
       this.$emit("update:source", source);
       // emit change
-      this.$emit("change", prop, source, type);
+      this.$emit("change", prop, type, source);
     },
   },
   created() {},

+ 1 - 1
src/views/purchase/purchase-order/add/index.vue

@@ -250,7 +250,7 @@ export default {
       });
     },
     // 子表参照改变之后
-    handleReferChange(val, source, type) {
+    handleReferChange(val,type, source) {
       console.log(val, 'val');
       console.log(source, 'source');
       console.log(type, 'type');

+ 26 - 12
src/views/purchase/purchase-order/column.js

@@ -1,7 +1,5 @@
 import {
   initPage,
-  initLayout,
-  initPageSizes,
   initParams,
   initColumns,
   initDicts,
@@ -18,6 +16,13 @@ export const TableColumns = [
     referName: "sys_order_type",
   },
   { key: "code", title: "订单编号", search: true, inputType: "Input" },
+  {
+    key: "status",
+    title: "单据状态",
+    inputType: "Select",
+    width:80,
+    referName: "sys_status", // 字典名
+  },
   { key: "billDate", title: "订单日期" },
   // { key: "supplier", title: "供应商" },
   { key: "supplierName", title: "供应商", search: true, inputType: "Input" },
@@ -36,11 +41,13 @@ export const TableColumns = [
     key: "isArrival",
     title: "到货超期",
     inputType: 'Checkbox',
+    width:80,
   },
   {
     key: "isBack",
     title: "退货",
     inputType: 'Checkbox',
+    width:80,
   },
   // { key: "freezeCause", title: "冻结原因" },
   { key: "qty", title: "总数量" },
@@ -62,6 +69,7 @@ export const TableColumns = [
     key: "isInvoice",
     title: "发票标识",
     inputType: 'Checkbox',
+    width:80,
   },
   { key: "rebateMoney", title: "订单使用返利金额" },
   { key: "deductionMoney", title: "订单抵扣余款金额" },
@@ -77,6 +85,7 @@ export const TableColumns = [
     key: "isUrgency",
     title: "紧急程度",
     inputType: 'Checkbox',
+    width:80,
   },
   // { key: "agent", title: "代理人" }, // 建议删除
   { key: "agentName", title: "代理人" },
@@ -84,6 +93,7 @@ export const TableColumns = [
     key: "isClose",
     title: "最终关闭",
     inputType: 'Checkbox',
+    width:80,
   },
   { key: "applyPaymentMoney", title: "累计付款申请金额" },
   { key: "paymentMoney", title: "累计付款金额" },
@@ -103,12 +113,7 @@ export const TableColumns = [
   { key: "createTime", title: "制单日期/创建时间" },
   { key: "remark", title: "备注" },
   { key: "updateTime", title: "最后修改时间" },
-  {
-    key: "status",
-    title: "单据状态",
-    inputType: "Select",
-    referName: "sys_status", // 字典名
-  },
+
   { key: "oaDemandNo", title: "OA需求单号" },
   { key: "address", title: "收货地址" },
   { key: "contacts", title: "收获联系人" },
@@ -116,13 +121,14 @@ export const TableColumns = [
     key: "isSendWms",
     title: "已同步WMS",
     inputType: 'Checkbox',
+    width:120,
   },
-  { key: "retReason", title: "退换原因" },
+  { key: "retReasonName", title: "退换原因" },
   { key: "closeTime", title: "最终关闭日期" },
-  { key: "processType", title: "处理方式" },
+  { key: "processTypeName", title: "处理方式" },
   { key: "isEnd", title: "整单关闭标识" },
-  { key: "projectNow", title: "在建工程项目" },
-  { key: "operatingItems", title: "经营性项目" },
+  { key: "projectNowName", title: "在建工程项目" },
+  { key: "operatingItemsName", title: "经营性项目" },
   { key: "isArrivalReson", title: "到货超期原因" },
   { key: "midOrderNo", title: "中台采购订单号" }
 ];
@@ -146,6 +152,7 @@ export const TabColumns = [
         title: "医药物料",
         width: 180,
         inputType: 'Checkbox',
+        width:80,
       },
       { key: "manufacturer", title: "生产厂家代理人", width: 180 },
       { key: "isDrug", title: "物料药品属性", width: 180 },
@@ -163,26 +170,31 @@ export const TabColumns = [
         key: "isStorage",
         title: "入库关闭",
         inputType: 'Checkbox',
+        width:80,
       },
       {
         key: "isInvoice",
         title: "开票关闭",
         inputType: 'Checkbox',
+        width:80,
       },
       {
         key: "isArrival",
         title: "到货关闭",
         inputType: 'Checkbox',
+        width:80,
       },
       {
         key: "isPayment",
         title: "付款关闭",
         inputType: 'Checkbox',
+        width:80,
       },
       {
         key: "isGift",
         title: "赠品",
         inputType: 'Checkbox',
+        width:80,
       },
       { key: "warehouse", title: "收货仓库", width: 180 },
       { key: "place", title: "收货地点", width: 180 },
@@ -208,11 +220,13 @@ export const TabColumns = [
         key: "isBatchLock",
         title: "批号锁定标识",
         inputType: 'Checkbox',
+        width:80,
       },
       {
         key: "isReplenishment",
         title: "补单标识",
         inputType: 'Checkbox',
+        width:80,
       },
       { key: "isUrgency", title: "紧急标识" },
       { key: "originalQty", title: "原始数量" },

+ 1 - 1
src/views/purchase/purchase-order/components/FileUploadCenter/index.vue

@@ -57,7 +57,7 @@ export default {
     // 文件类型, 例如['png', 'jpg', 'jpeg']
     fileType: {
       type: Array,
-      default: () => ["doc", "xls", "ppt", "txt", "pdf", "jpg"],
+      default: () => ["doc", "xls", "ppt", "txt", "pdf", "jpg", "png"],
     },
     // 是否显示提示
     isShowTip: {

+ 1 - 1
src/views/purchase/purchase-order/edit/index.vue

@@ -183,7 +183,7 @@ export default {
     beforeOpen() {
     },
     // 子表参照改变之后
-    handleReferChange(val, source, type) {
+    handleReferChange(val,  type,source) {
       console.log(val, 'val');
       console.log(source, 'source');
       console.log(type, 'type');

+ 9 - 24
src/views/purchase/purchase-order/index.vue

@@ -4,8 +4,6 @@ import { TableColumns, SearchColumns, TabColumns, SelectColumns } from "./column
 import orderApi from "@/api/business/purchase/purchase-order";
 import {
   initPage,
-  initLayout,
-  initPageSizes,
   initParams,
   initColumns,
   initDicts,
@@ -25,8 +23,7 @@ export default {
     return {
       loading: false,
       isSimpleSearch: true,
-      pageSizes: initPageSizes(),
-      layout: initLayout(),
+      pageSizes: [10, 20, 50, 100],
       page: initPage(),
       searchColumns: SearchColumns,
       params: initParams(SearchColumns),
@@ -75,16 +72,7 @@ export default {
       //   title: this.isSimpleSearch ? "Simple Search" : "All Search",
       // });
     },
-    // 页大小变
-    handleSizeChange(prop) {
-      this.page.pageSize = prop;
-      this.fetchList(this.params, this.page);
-    },
-    // 当前页变
-    handleCurrentChange(prop) {
-      this.page.pageNum = prop;
-      this.fetchList(this.params, this.page);
-    },
+
     // 刷新操作
     handleRefreshList() {
       this.fetchList(this.params, this.page);
@@ -399,17 +387,14 @@ export default {
       </el-table-column>
 
     </el-table>
-    <el-pagination 
-      @size-change="handleSizeChange" 
-      @current-change="handleCurrentChange" 
+
+    <pagination
+      v-show="page.total>0"
       :total="page.total"
-      :page-sizes="pageSizes" 
-      :page-size="page.pageSize" 
-      :current-page="page.pageNum" 
-      hide-on-single-page 
-      :layout="layout"
-      style="text-align: right;margin-top: 10px;"
-    ></el-pagination>
+      :page.sync="page.pageNum"
+      :limit.sync="page.pageSize"
+      @pagination="fetchList(params, page)"
+    />
 
     <el-tabs v-model="tabName" @tab-click="handleTabClick" style="width: 100%;padding: 20px 10px">
       <el-tab-pane 

+ 26 - 21
src/views/purchase/purchase-order/see/index.vue

@@ -68,17 +68,19 @@ export default {
       this.setVisible(false);
       this.params = initParams(Columns);
     },
+    handleRefresh(){
+      let {id} = this.params;
+      this.fetchItem(id);
+    },
     // 发送NC
     async handleSendNC(){
       console.log('发送NC');
 
       try {
-        let {code,deliveryMsg} = await orderApi.toNc({
-          puOrderId:this.params.id
-        });
+        let {code} = await orderApi.toNc({ puOrderId:this.params.id});
 
         if(code == 200){
-
+          this.handleRefresh();
         }
       } catch (error) {
         
@@ -91,7 +93,6 @@ export default {
 
       let {source,status,deliveryStatus} = this.params;
 
-      console.log('deliveryStatus' in  this.params,'deliveryStatus');
       // 自制 & 状态为:自由态、驳回
       if(source === '3' &&(status === '0' || status === '3')){
 
@@ -133,23 +134,27 @@ export default {
           ">
           <h3>查看</h3>
           <div style="text-align: right">
-            <el-button size="mini" @click="handleCancel">取 消</el-button>
-            <el-tooltip
-              v-if="judgeIsToNC()"
-              class="box-item"
-              effect="dark"
-              :content="params.deliveryMsg"
-              placement="bottom-end"
-            >
-              <el-button 
+            <el-button size="mini" @click="handleRefresh">刷新</el-button>
+            <template v-if="judgeIsToNC()">
+              <el-tooltip
+                class="box-item"
+                effect="dark"
                 :key="params.deliveryStatus"
-                size="mini" 
-                type="primary"
-                @click="handleSendNC"
-              >{{  params.deliveryStatus === '1' ? '发送中' :
-                  (params.deliveryStatus === '2'? '重新发送' : '发送NC')
-               }}</el-button>
-            </el-tooltip>
+                :content="params.deliveryMsg"
+                placement="bottom-end"
+              >
+                <el-button 
+                  :key="params.deliveryStatus"
+                  :disabled="params.deliveryStatus === '1' "
+                  size="mini" 
+                  type="primary"
+                  @click="handleSendNC"
+                >{{  params.deliveryStatus === '1' ? '发送中' :
+                    (params.deliveryStatus === '2'? '重新发送NC' : '发送NC')
+                }}</el-button>
+              </el-tooltip>
+            </template>
+            <el-button size="mini" @click="handleCancel">取 消</el-button>
           </div>
         </div>
         <el-row style="display:flex; flex-wrap: wrap;">