Pārlūkot izejas kodu

Merge branch 'purchaseDev' of http://172.16.100.139/new-business/drp-web into purchaseDev

002201 2 gadi atpakaļ
vecāks
revīzija
31427dd2fa

+ 12 - 2
src/api/business/purchase/purchase-order.js

@@ -1,9 +1,9 @@
 import request from "@/utils/request";
 
 // 采购订单修订列表
-const list = (data) => {
+const list = (data, page) => {
   return request({
-    url: `/pu/order/list`,
+    url: `/pu/order/list?pageSize=${page.pageSize}&pageNum=${page.pageNum}`,
     method: "post",
     data,
   });
@@ -71,6 +71,15 @@ const getPrice = (data) => {
   });
 }
 
+// 采购订单退回
+const documentsReturn = (data) => {
+  return request({
+    url: `/pu/order/documentsReturn`,
+    method: "put",
+    data,
+  });
+}
+
 export default {
   list,
   details,
@@ -80,5 +89,6 @@ export default {
   revision,
   remove,
   getPrice,
+  documentsReturn,
 
 }

+ 1 - 1
src/components/input-dialog/components/CONTACTS_PARAM.js

@@ -1,4 +1,4 @@
-// 客户部门
+// 联系人部门
 export default [
   {
     key: "code",

+ 36 - 2
src/views/purchase/DemandSummary/index.vue

@@ -267,6 +267,7 @@
           :key="isUpdate"
         >
           <el-table-column type="selection" width="55" />
+          <el-table-column label="行状态" align="center" prop="status" width="120px" :formatter="hangStatus"/>
           <el-table-column label="一级品类" align="center" prop="materialClassifyOneName" width="120px"/>
           <el-table-column label="物料编码" align="center" prop="materialCode" width="180px"/>
           <el-table-column label="品名" align="center" prop="materialName" width="180px"/>
@@ -309,7 +310,6 @@
           <el-table-column label="二级品类" align="center" prop="materialClassifyTwoName" width="150px"/>
           <el-table-column label="三级品类" align="center" prop="materialClassifyThreeName" width="150px"/>
           <el-table-column label="四级品类" align="center" prop="materialClassifyFourName" width="150px"/>
-          <el-table-column label="单据状态" align="center" prop="status"/>
           <el-table-column label="采购员" align="center" prop="buyerName" width="150px">
             <template slot-scope="scope">
                 <el-input :disabled="lineDisable" size="small" v-model="scope.row.buyerName">
@@ -326,7 +326,7 @@
           </el-table-column>
           <el-table-column label="有效期" align="center" prop="validityPeriod"/>
           <el-table-column label="有效期单位" align="center" prop="validityPeriodUnit" width="100px"/>
-          <el-table-column label="业务类型" align="center" prop="businessType"/>
+          <el-table-column label="业务类型" align="center" prop="businessType" :formatter="formatterBusinessType"/>
           <el-table-column label="安全库存量" align="center" prop="safetyStock" width="100px"/>
           <el-table-column label="单据来源" align="center" prop="billSource"/>
           <el-table-column label="行号" align="center" prop="rowNo"/>
@@ -393,6 +393,40 @@ export default {
   },
   data() {
     return {
+      hangStatus(row) {
+        switch (row.status) {
+          case '0':
+            return '需补货'
+          case '1':
+            return '待采购确认'
+          case '2':
+            return '采购已确认'
+          case '3':
+            return '采购已审核'
+          case '4':
+            return '行关闭'
+          case '5':
+            return '总供应可满足'
+        }
+      },
+      formatterBusinessType(row) {
+        switch (row.businessType) {
+          case 'ZQBH':
+            return '周期备货'
+          case 'FXXQ':
+            return '分销需求'
+          case 'TSXQ':
+            return '特殊采购需求'
+          case 'BDXQ':
+            return '补单需求'
+          case 'JJXQ':
+            return '紧急需求单'
+          case 'XPXQ':
+            return '新品需求'
+          case 'HZBM':
+            return '合作部门需求'
+        }
+      },
       isUpdate: false,
       expanded: false,
       // 页面配置

+ 16 - 19
src/views/purchase/purchase-order/add/column.js

@@ -19,6 +19,10 @@ export const Columns = [
     require: true,
     config: {
       optionsName: "sys_order_type", // 字典名
+      dataMapping: {
+        billType: "code",
+        billTypeName: "name",
+      },
     },
   },
   // { key: "billTypeName", title: "订单类型名称", },
@@ -84,12 +88,12 @@ export const Columns = [
     title: "采购员",
     type: "InputDialog",
     config: {
-      componentName: "ORG_PARAM",
+      componentName: "CONTACTS_PARAM",
       dataMapping: {
-        buyer: "userId",
-        buyerName: "userName",
-        puDept: "deptId",
-        puDeptName: "deptName",
+        buyer: "code",
+        buyerName: "name",
+        // puDept: "deptId",
+        // puDeptName: "deptName",
       },
     },
     require: true,
@@ -228,14 +232,14 @@ export const Columns = [
   { key: "supplierPersonalName", title: "供应商业务员名称", type: "Input", },
   { key: "isDeliver", title: "是否发货", type: "Checkbox", },
   {
-    key: "retReason",
+    key: "retReasonName",
     title: "退换原因",
     type: "InputDialog",
     config: {
       componentName: "RETREASON_PARAM",
       dataMapping: {
         retReason: "code",
-        // retReasonName: "name",
+        retReasonName: "name",
       },
     },
   },
@@ -253,26 +257,26 @@ export const Columns = [
   },
   { key: "isEnd", title: "整单关闭标识", type: "Input", },
   {
-    key: "projectNow",
+    key: "projectNowName",
     title: "在建工程项目",
     type: "InputDialog",
     config: {
       componentName: "PROJECT_PARAM",
       dataMapping: {
         projectNow: "code",
-        // processTypeName: "name",
+        projectNowName: "name",
       },
     },
   },
   {
-    key: "operatingItems",
+    key: "operatingItemsName",
     title: "经营性项目",
     type: "InputDialog",
     config: {
       componentName: "OPERATING_PARAM",
       dataMapping: {
         operatingItems: "code",
-        // processTypeName: "name",
+        operatingItemsName: "name",
       },
     },
   },
@@ -306,11 +310,10 @@ export const TabColumns = [
     title: '物料信息',
     key: 'puOrderItemList',
     tableColumns: [
-      // { key: "id", title: "主键" },
       { key: "rowNo", title: "行号", type: "Input", },
       { key: "orderId", title: "采购订单ID", type: "Input", },
       // {key: "material",title: "物料",type: "Input",   },
-      { key: "materialName", title: "物料名称", type: "Input", },
+      { key: "materialName", title: "物料", type: "Input", },
       {
         key: "materialCode",
         title: "物料编码",
@@ -410,13 +413,9 @@ export const TabColumns = [
       { key: "isDistributionPrice", title: "配送价", type: "Input", },
       { key: "createByName", title: "创建人名称", type: "Input", },
       { key: "updateByName", title: "更新人名称", type: "Input", },
-      // { key: "materialClassifyOne", title: "物料一级分类",type: "Input", },
       { key: "materialClassifyOneName", title: "物料一级分类名称", type: "Input", },
-      // { key: "materialClassifyTwo", title: "物料二级分类",type: "Input", },
       { key: "materialClassifyTwoName", title: "物料二级分类名称", type: "Input", },
-      // { key: "materialClassifyThree", title: "物料三级分类",type: "Input", },
       { key: "materialClassifyThreeName", title: "物料三级分类名称", type: "Input", },
-      // { key: "materialClassifyFour", title: "物料四级分类",type: "Input", },
       { key: "materialClassifyFourName", title: "物料四级分类名称", type: "Input", },
       { key: "price", title: "无税单价", type: "Input", }
     ]
@@ -425,7 +424,6 @@ export const TabColumns = [
     title: '执行结果',
     key: 'puOrderExecuteList',
     tableColumns: [
-      // { key: "id", title: "主键",type: "Input", },
       { key: "orderId", title: "采购订单ID", type: "Input", },
       { key: "rowno", title: "行号", type: "Input", },
       {
@@ -441,7 +439,6 @@ export const TabColumns = [
           },
         },
       },
-      // { key: "materialName", title: "物料名称", type: "Input", },
       { key: "specification", title: "规格", type: "Input", },
       { key: "qty", title: "数量", type: "Input", },
       { key: "stroageQty", title: "累计到货主数量", type: "Input", },

+ 24 - 10
src/views/purchase/purchase-order/add/index.vue

@@ -40,15 +40,16 @@ export default {
     };
   },
   computed: {},
-  watch: {},
+  watch: {
+
+  },
   methods: {
     beforeOpen() {
-      const { deptName, deptId, name, id, orgName, orgId } =
-        this.$store.state.user;
+      const { deptName, deptId, name, nickName, orgName, orgId } = this.$store.state.user;
       this.params.puOrg = orgId;
       this.params.puOrgName = orgName;
-      this.params.buyer = id;
-      this.params.buyerName = name;
+      this.params.buyer = name;
+      this.params.buyerName = nickName;
       this.params.puDept = deptId;
       this.params.puDeptName = deptName;
     },
@@ -57,10 +58,22 @@ export default {
     },
     // 增行
     addTableRow(prop) {
-      const arr = this.tabColumns.find(
-        (element) => element.key === this.tabName
-      ).tableColumns;
-      prop.push(initParams(arr, "key", "value"));
+
+      for (const key in this.params) {
+
+        if (Array.isArray(this.params[key])) {
+
+          const arr = this.tabColumns.find(
+            (element) => element.key === key
+          ).tableColumns;
+          this.params[key].push(initParams(arr, "key", "value"));
+        }
+      }
+
+      // const arr = this.tabColumns.find(
+      //   (element) => element.key === this.tabName
+      // ).tableColumns;
+      // prop.push(initParams(arr, "key", "value"));
     },
     // 删行
     delTableRow(prop, index) {
@@ -120,7 +133,7 @@ export default {
     },
   },
   created() {
-    console.log("ADD CREATED");
+    console.log("ADD CREATED", this.params);
   },
   mounted() { },
   destroyed() { },
@@ -200,6 +213,7 @@ export default {
           </el-col>
         </el-row>
       </el-card>
+
       <el-card :body-style="{
         padding: '20px',
         display: 'flex',

+ 170 - 170
src/views/purchase/purchase-order/column.js

@@ -1,179 +1,179 @@
 export const TableColumns = [
-   // { key: "id", title: "主键" },
-      // { key: "puOrg", title: "采购组织" },
-      { key: "puOrgName", title: "采购组织名称",search: true, type: "Input"  },
-      { key: "billType", title: "订单类型" },
-      { key: "code", title: "订单编号",search: true, type: "Input"  },
-      { key: "billDate", title: "订单日期" },
-      // { key: "supplier", title: "供应商" },
-      { key: "supplierName", title: "供应商名称",search: true, type: "Input" },
-      { key: "paymentAgreement", title: "付款协议" },
-      // { key: "currency", title: "币种" },
-      { key: "currencyName", title: "币种名称" },
-      // { key: "buyer", title: "采购员" },
-      { key: "buyerName", title: "采购员" },
-      // { key: "puDept", title: "采购部门" },
-      { key: "puDeptName", title: "采购部门名称" },
-      // { key: "customer", title: "收货客户" },
-      { key: "customerName", title: "收货客户名称" },
-      { key: "isDeliver", title: "是否发货" },
-      { key: "isArrival", title: "到货超期" },
-      { key: "isBack", title: "退货" },
-      // { key: "freezeCause", title: "冻结原因" },
-      { key: "qty", title: "总数量" },
-      { key: "money", title: "总数量" },
-      { key: "isMarketing", title: "已协同生成销售订单" },
-      { key: "isMarketingSource", title: "由销售订单协同生成" },
-      // { key: "personal", title: "人员" },
-      { key: "personalName", title: "人员名称" },
-      // { key: "isSendSrm", title: "是否同步SRM" },
-      { key: "isInvoice", title: "发票标识" },
-      { key: "rebateMoney", title: "订单使用返利金额" },
-      { key: "deductionMoney", title: "订单抵扣余款金额" },
-      // { key: "warehouse", title: "WMS入库仓库" },
-      { key: "warehouseName", title: "收货仓库" }, //WMS入库仓库名称
-      // { key: "goodsAllocation", title: "货位" },
-      { key: "goodsAllocationName", title: "货位名称" },
-      // { key: "customerDept", title: "客户部门" },
-      { key: "customerDeptName", title: "客户部门名称" },
-      // { key: "supplierContacts", title: "供应商业务联系人" },
-      { key: "supplierContactsName", title: "供应商业务联系人名称" },
-      { key: "isUrgency", title: "紧急程度" },
-      // { key: "agent", title: "代理人" }, // 建议删除
-      { key: "agentName", title: "代理人名称" },
-      { key: "isClose", title: "最终关闭" },
-      { key: "applyPaymentMoney", title: "累计付款申请金额" },
-      { key: "paymentMoney", title: "累计付款金额" },
-      { key: "invoiceMoney", title: "发票金额" },
-      // { key: "supplierPersonal", title: "供应商业务员" },
-      { key: "supplierPersonalName", title: "供应商业务员名称" },
-      { key: "marketingCode", title: "销售订单号" },
+  // { key: "id", title: "主键" },
+  // { key: "puOrg", title: "采购组织" },
+  { key: "puOrgName", title: "采购组织名称", search: true, type: "Input" },
+  { key: "billType", title: "订单类型" },
+  { key: "code", title: "订单编号", search: true, type: "Input" },
+  { key: "billDate", title: "订单日期" },
+  // { key: "supplier", title: "供应商" },
+  { key: "supplierName", title: "供应商名称", search: true, type: "Input" },
+  { key: "paymentAgreement", title: "付款协议" },
+  // { key: "currency", title: "币种" },
+  { key: "currencyName", title: "币种名称" },
+  // { key: "buyer", title: "采购员" },
+  { key: "buyerName", title: "采购员" },
+  // { key: "puDept", title: "采购部门" },
+  { key: "puDeptName", title: "采购部门名称" },
+  // { key: "customer", title: "收货客户" },
+  { key: "customerName", title: "收货客户名称" },
+  { key: "isDeliver", title: "是否发货" },
+  { key: "isArrival", title: "到货超期" },
+  { key: "isBack", title: "退货" },
+  // { key: "freezeCause", title: "冻结原因" },
+  { key: "qty", title: "总数量" },
+  { key: "money", title: "总数量" },
+  { key: "isMarketing", title: "已协同生成销售订单" },
+  { key: "isMarketingSource", title: "由销售订单协同生成" },
+  // { key: "personal", title: "人员" },
+  { key: "personalName", title: "人员名称" },
+  // { key: "isSendSrm", title: "是否同步SRM" },
+  { key: "isInvoice", title: "发票标识" },
+  { key: "rebateMoney", title: "订单使用返利金额" },
+  { key: "deductionMoney", title: "订单抵扣余款金额" },
+  // { key: "warehouse", title: "WMS入库仓库" },
+  { key: "warehouseName", title: "收货仓库" }, //WMS入库仓库名称
+  // { key: "goodsAllocation", title: "货位" },
+  { key: "goodsAllocationName", title: "货位名称" },
+  // { key: "customerDept", title: "客户部门" },
+  { key: "customerDeptName", title: "客户部门名称" },
+  // { key: "supplierContacts", title: "供应商业务联系人" },
+  { key: "supplierContactsName", title: "供应商业务联系人名称" },
+  { key: "isUrgency", title: "紧急程度" },
+  // { key: "agent", title: "代理人" }, // 建议删除
+  { key: "agentName", title: "代理人名称" },
+  { key: "isClose", title: "最终关闭" },
+  { key: "applyPaymentMoney", title: "累计付款申请金额" },
+  { key: "paymentMoney", title: "累计付款金额" },
+  { key: "invoiceMoney", title: "发票金额" },
+  // { key: "supplierPersonal", title: "供应商业务员" },
+  { key: "supplierPersonalName", title: "供应商业务员名称" },
+  { key: "marketingCode", title: "销售订单号" },
+  // { key: "tenantId", title: "租户号" },
+  // { key: "revision", title: "乐观锁" },
+  { key: "createByName", title: "创建人名称" },
+  { key: "updateByName", title: "更新人名称" },
+  // { key: "delFlag", title: "删除标记" },
+  { key: "flowId", title: "OA流程ID" },
+  { key: "approver", title: "审批人" },
+  { key: "approverFinishTime", title: "审批时间" },
+  { key: "approveTime", title: "提交时间" },
+  { key: "createTime", title: "制单日期/创建时间" },
+  { key: "remark", title: "备注" },
+  { key: "updateTime", title: "最后修改时间" },
+  { key: "status", title: "单据状态" },
+  { key: "oaDemandNo", title: "OA需求单号" },
+  { key: "address", title: "收货地址" },
+  { key: "contacts", title: "收获联系人" },
+  { key: "isSendWms", title: "已同步WMS" },
+  { key: "retReason", title: "退换原因" },
+  { key: "closeTime", title: "最终关闭日期" },
+  { key: "processType", title: "处理方式" },
+  { key: "isEnd", title: "整单关闭标识" },
+  { key: "projectNow", title: "在建工程项目" },
+  { key: "operatingItems", title: "经营性项目" },
+  { key: "isArrivalReson", title: "到货超期原因" },
+  { key: "midOrderNo", title: "中台采购订单号" }
+];
+
+export const TabColumns = [
+  {
+    title: '物料信息',
+    key: 'puOrderItemList',
+    tableColumns: [
+      { key: "rowNo", title: "行号" },
+      { key: "orderId", title: "采购订单ID" },
+      { key: "material", title: "物料" },
+      { key: "materialName", title: "物料名称", width: 180 },
+      { key: "materialCode", title: "物料编码", width: 180 },
+      { key: "materialClassify", title: "物料分类", width: 180 },
+      { key: "materialManufacturersCode", title: "厂家物料编码", width: 180 },
+      { key: "specification", title: "规格", width: 180 },
+      { key: "model", title: "型号", width: 180 },
+      { key: "isMedcine", title: "医药物料", width: 180 },
+      { key: "manufacturer", title: "生产厂家代理人", width: 180 },
+      { key: "isDrug", title: "物料药品属性", width: 180 },
+      { key: "unit", title: "单位", width: 180 },
+      { key: "qty", title: "数量" },
+      { key: "taxPrice", title: "含税单价" },
+      { key: "money", title: "价税合计" },
+      { key: "tax", title: "税率" },
+      { key: "taxDeductMoneya", title: "折扣金额" },
+      { key: "arrivalQty", title: "已到货数量" },
+      { key: "unarrivedQty", title: "未到货数量" },
+      { key: "notaxMoney", title: "无税金额" },
+      { key: "priceSource", title: "价格目录ID" },
+      { key: "isStorage", title: "入库关闭" },
+      { key: "isInvoice", title: "开票关闭" },
+      { key: "isArrival", title: "到货关闭" },
+      { key: "isPayment", title: "付款关闭" },
+      { key: "isGift", title: "赠品" },
+      { key: "warehouse", title: "收货仓库", width: 180 },
+      { key: "place", title: "收货地点", width: 180 },
+      { key: "address", title: "收货地址", width: 180 },
+      { key: "productBatch", title: "产品批号", width: 180 },
+      { key: "manufactureDate", title: "生产日期", width: 180 },
+      { key: "efficacyLoseDate", title: "有效期至/失效日期", width: 180 },
+      { key: "approvalNumber", title: "批准文号", width: 180 },
+      { key: "registration", title: "注册证号", width: 180 },
+      { key: "storageCondition", title: "存储条件" },
+      { key: "carriageCondition", title: "运输条件" },
+      { key: "isBatchLock", title: "批号锁定标识" },
+      { key: "isReplenishment", title: "补单标识" },
+      { key: "isUrgency", title: "紧急标识" },
+      { key: "originalQty", title: "原始数量" },
+      { key: "originalMoney", title: "原始金额" },
+      { key: "directProductBatch", title: "直运产品批号", width: 180 },
+      { key: "discountRule", title: "折扣规则编码", width: 180 },
+      { key: "reservedQty", title: "预留数量" },
+      { key: "reservedPeriod", title: "预留周期", width: 180 },
+      { key: "taxDeductClassify", title: "扣税类别" },
+      { key: "exchangeRate", title: "折本汇率" },
+      { key: "source", title: "上游单据号", width: 180 },
+      { key: "sourceId", title: "上游单据ID", width: 180 },
+      { key: "demandCode", title: "采购需求单号", width: 180 },
+      { key: "arrivalDatePlan", title: "计划到货日期", width: 180 },
+      { key: "priceType", title: "价格类型" },
+      { key: "isDistributionPrice", title: "配送价" },
       // { key: "tenantId", title: "租户号" },
       // { key: "revision", title: "乐观锁" },
       { key: "createByName", title: "创建人名称" },
       { key: "updateByName", title: "更新人名称" },
       // { key: "delFlag", title: "删除标记" },
-      { key: "flowId", title: "OA流程ID" },
-      { key: "approver", title: "审批人" },
-      { key: "approverFinishTime", title: "审批时间" },
-      { key: "approveTime", title: "提交时间" },
-      { key: "createTime", title: "制单日期/创建时间" },
-      { key: "remark", title: "备注" },
-      { key: "updateTime", title: "最后修改时间" },
-      { key: "status", title: "单据状态" },
-      { key: "oaDemandNo", title: "OA需求单号" },
-      { key: "address", title: "收货地址" },
-      { key: "contacts", title: "收获联系人" },
-      { key: "isSendWms", title: "已同步WMS" },
-      { key: "retReason", title: "退换原因" },
-      { key: "closeTime", title: "最终关闭日期" },
-      { key: "processType", title: "处理方式" },
-      { key: "isEnd", title: "整单关闭标识" },
-      { key: "projectNow", title: "在建工程项目" },
-      { key: "operatingItems", title: "经营性项目" },
-      { key: "isArrivalReson", title: "到货超期原因" },
-      { key: "midOrderNo", title: "中台采购订单号" }
+      // { key: "materialClassifyOne", title: "物料一级分类" },
+      { key: "materialClassifyOneName", title: "物料一级分类名称", width: 180 },
+      // { key: "materialClassifyTwo", title: "物料二级分类" },
+      { key: "materialClassifyTwoName", title: "物料二级分类名称", width: 180 },
+      // { key: "materialClassifyThree", title: "物料三级分类" },
+      { key: "materialClassifyThreeName", title: "物料三级分类名称", width: 180 },
+      // { key: "materialClassifyFour", title: "物料四级分类" },
+      { key: "materialClassifyFourName", title: "物料四级分类名称", width: 180 },
+      { key: "price", title: "无税单价" }
+    ]
+  },
+  {
+    title: '执行结果',
+    key: 'puOrderExecuteList',
+    tableColumns: [
+      // { key: "id", title: "主键" },
+      { key: "orderId", title: "采购订单ID", width: 180 },
+      { key: "rowno", title: "行号" },
+      { key: "material", title: "物料", width: 180 },
+      { key: "materialName", title: "物料名称", width: 180 },
+      { key: "specification", title: "规格" },
+      { key: "qty", title: "数量" },
+      { key: "stroageQty", title: "累计到货主数量" },
+      { key: "stockQty", title: "累计入库主数量" },
+      { key: "invoiceQty", title: "累计开票主数量" },
+      { key: "rollbackQty", title: "累计退货主数量" },
+      { key: "backStockQty", title: "累计退库主数量" },
+      { key: "floatQty", title: "未到货数量" },
+      // { key: "tenantId", title: "租户号" },
+      // { key: "revision", title: "乐观锁" },
+      { key: "createByName", title: "创建人名称", width: 180 },
+      { key: "updateByName", title: "更新人名称", width: 180 },
+      // { key: "delFlag", title: "删除标记" }
+    ]
+  },
 ];
 
-export const TabColumns = [
-   {
-     title: '物料信息',
-     key: 'puOrderItemList',
-     tableColumns: [
-       { key: "rowNo", title: "行号" },
-       { key: "orderId", title: "采购订单ID" },
-       { key: "material", title: "物料" },
-       { key: "materialName", title: "物料名称" },
-       { key: "materialCode", title: "物料编码" },
-       { key: "materialClassify", title: "物料分类" },
-       { key: "materialManufacturersCode", title: "厂家物料编码" },
-       { key: "specification", title: "规格" },
-       { key: "model", title: "型号" },
-       { key: "isMedcine", title: "医药物料" },
-       { key: "manufacturer", title: "生产厂家代理人" },
-       { key: "isDrug", title: "物料药品属性" },
-       { key: "unit", title: "单位" },
-       { key: "qty", title: "数量" },
-       { key: "taxPrice", title: "含税单价" },
-       { key: "money", title: "价税合计" },
-       { key: "tax", title: "税率" },
-       { key: "taxDeductMoneya", title: "折扣金额" },
-       { key: "arrivalQty", title: "已到货数量" },
-       { key: "unarrivedQty", title: "未到货数量" },
-       { key: "notaxMoney", title: "无税金额" },
-       { key: "priceSource", title: "价格目录ID" },
-       { key: "isStorage", title: "入库关闭" },
-       { key: "isInvoice", title: "开票关闭" },
-       { key: "isArrival", title: "到货关闭" },
-       { key: "isPayment", title: "付款关闭" },
-       { key: "isGift", title: "赠品" },
-       { key: "warehouse", title: "收货仓库" },
-       { key: "place", title: "收货地点" },
-       { key: "address", title: "收货地址" },
-       { key: "productBatch", title: "产品批号" },
-       { key: "manufactureDate", title: "生产日期" },
-       { key: "efficacyLoseDate", title: "有效期至/失效日期" },
-       { key: "approvalNumber", title: "批准文号" },
-       { key: "registration", title: "注册证号" },
-       { key: "storageCondition", title: "存储条件" },
-       { key: "carriageCondition", title: "运输条件" },
-       { key: "isBatchLock", title: "批号锁定标识" },
-       { key: "isReplenishment", title: "补单标识" },
-       { key: "isUrgency", title: "紧急标识" },
-       { key: "originalQty", title: "原始数量" },
-       { key: "originalMoney", title: "原始金额" },
-       { key: "directProductBatch", title: "直运产品批号" },
-       { key: "discountRule", title: "折扣规则编码" },
-       { key: "reservedQty", title: "预留数量" },
-       { key: "reservedPeriod", title: "预留周期" },
-       { key: "taxDeductClassify", title: "扣税类别" },
-       { key: "exchangeRate", title: "折本汇率" },
-       { key: "source", title: "上游单据号" },
-       { key: "sourceId", title: "上游单据ID" },
-       { key: "demandCode", title: "采购需求单号" },
-       { key: "arrivalDatePlan", title: "计划到货日期" },
-       { key: "priceType", title: "价格类型" },
-       { key: "isDistributionPrice", title: "配送价" },
-       // { key: "tenantId", title: "租户号" },
-       // { key: "revision", title: "乐观锁" },
-       { key: "createByName", title: "创建人名称" },
-       { key: "updateByName", title: "更新人名称" },
-       // { key: "delFlag", title: "删除标记" },
-       // { key: "materialClassifyOne", title: "物料一级分类" },
-       { key: "materialClassifyOneName", title: "物料一级分类名称" },
-       // { key: "materialClassifyTwo", title: "物料二级分类" },
-       { key: "materialClassifyTwoName", title: "物料二级分类名称" },
-       // { key: "materialClassifyThree", title: "物料三级分类" },
-       { key: "materialClassifyThreeName", title: "物料三级分类名称" },
-       // { key: "materialClassifyFour", title: "物料四级分类" },
-       { key: "materialClassifyFourName", title: "物料四级分类名称" },
-       { key: "price", title: "无税单价" }
-     ]
-   },
-   {
-     title: '执行结果',
-     key: 'puOrderExecuteList',
-     tableColumns: [
-       // { key: "id", title: "主键" },
-       { key: "orderId", title: "采购订单ID" },
-       { key: "rowno", title: "行号" },
-       { key: "material", title: "物料" },
-       { key: "materialName", title: "物料名称" },
-       { key: "specification", title: "规格" },
-       { key: "qty", title: "数量" },
-       { key: "stroageQty", title: "累计到货主数量" },
-       { key: "stockQty", title: "累计入库主数量" },
-       { key: "invoiceQty", title: "累计开票主数量" },
-       { key: "rollbackQty", title: "累计退货主数量" },
-       { key: "backStockQty", title: "累计退库主数量" },
-       { key: "floatQty", title: "未到货数量" },
-       // { key: "tenantId", title: "租户号" },
-       // { key: "revision", title: "乐观锁" },
-       { key: "createByName", title: "创建人名称" },
-       { key: "updateByName", title: "更新人名称" },
-       // { key: "delFlag", title: "删除标记" }
-     ]
-   },
- ];
-
 export const SearchColumns = TableColumns.filter((element) => element.search);

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

@@ -135,7 +135,7 @@ export default {
     },
   },
   created() {
-    console.log("ADD CREATED");
+    console.log("EDIT CREATED");
     console.log(this.params, 'this.params');
   },
   mounted() { },

+ 44 - 18
src/views/purchase/purchase-order/index.vue

@@ -130,6 +130,7 @@ export default {
         puOrderItemList: [],
         puOrderExecuteList: [],
       },
+      checkedList: [],
     };
   },
   computed: {
@@ -156,14 +157,11 @@ export default {
     async fetchList(params, page) {
       try {
         this.loading = true;
-        const { pageNum, pageSize } = page;
-        const { code, msg, rows, total } = await orderApi.list({
-          pageNum,
-          pageSize,
-          ...params,
-        });
+        // const { pageNum, pageSize } = page;
+        const { code, msg, rows, total } = await orderApi.list(params, page);
         if (code === 200) {
           this.page.total = total;
+          console.log(this.page, 'this.page');
           this.tableData = rows;
           this.$notify.success({ title: msg });
         } else {
@@ -268,7 +266,28 @@ export default {
     // 提交
     async handleSubmit(row) {
 
-    }
+    },
+    // 判断“退回”按钮
+    judgeIsSendBack() {
+
+      if (this.checkedList.length == 1) {
+
+        // 非手工、状态非审批通过  
+        if (this.checkedList[0].source != 3 && this.checkedList[0].status != 2) {
+
+          return false
+        }
+      }
+      return true;
+    },
+    //  退回
+    handleSendBack() {
+      console.log(this.checkedList[0].id);
+    },
+    handleSelect(selection, row) {
+      this.checkedList = selection;
+      console.log(this.checkedList, 'this.checkedList');
+    },
 
   },
 };
@@ -292,7 +311,8 @@ export default {
           </el-row>
         </el-col>
         <el-col :span="4" style="text-align: right; padding-right: 40px">
-          <el-button type="primary" size="mini" @click="handleQueryList">搜索</el-button>
+          <el-button type="primary" size="mini" @click="handleQueryList"
+            v-hasPermi="['material:order:query']">搜索</el-button>
           <el-button size="mini" @click="handleResetList">重置</el-button>
         </el-col>
       </el-row>
@@ -308,13 +328,15 @@ export default {
       <!-- <el-col :span="6">123</el-col> -->
       <el-col :span="24" style="text-align: right;margin: 0 10px 0 0">
         <el-button-group style="margin-left: 10px">
-          <el-button size="mini" type="danger" @click="handleOpenAddDrawer">新增</el-button>
+          <el-button size="mini" type="danger" @click="handleOpenAddDrawer"
+            v-hasPermi="['material:order:add']">新增</el-button>
           <el-button size="mini">复制</el-button>
 
         </el-button-group>
 
         <el-button-group style="margin-left: 10px">
-          <el-button size="mini">退回</el-button>
+          <el-button size="mini" @click="handleSendBack" :key="checkedList.length"
+            :disabled="judgeIsSendBack()">退回</el-button>
         </el-button-group>
 
         <el-button-group style="margin-left: 10px">
@@ -327,7 +349,8 @@ export default {
     </el-row>
 
     <el-table @row-dblclick="handleOpenSeeDrawer" @row-click="handleDetailsData" :data="tableData" size="mini"
-      highlight-current-row style="width: 100%; margin: 20px 0 0 0">
+      highlight-current-row style="width: 100%; margin: 20px 0 0 0" @select="handleSelect" height="450">
+      <el-table-column type="selection" width="45"></el-table-column>
       <el-table-column type="index" width="50" label="序号"></el-table-column>
       <el-table-column v-for="(column, index) in tableColumns" :key="index" :prop="column.key" :label="column.title"
         :width="column.width || 180" :show-overflow-tooltip="column.showOverflowTooltip || true">
@@ -335,10 +358,12 @@ export default {
       <el-table-column fixed="right" label="操作" width="120">
         <template slot-scope="scope">
           <!-- <el-button @click.stop="handleOpenSeeDrawer(scope.row)" type="text" size="small">查看</el-button> -->
-          <el-button type="text" size="small" @click.stop="handleOpenEditDrawer(scope.row)">
+          <el-button type="text" size="small" @click.stop="handleOpenEditDrawer(scope.row)"
+            v-hasPermi="['material:order:edit']">
             {{ scope.row.status == '2' ? '修订' : '编辑' }}</el-button>
           <!-- 0=自由态,1=审批中,2=已审核,3=已驳回 -->
-          <el-button type="text" size="small" @click.stop="handleDeleteList(scope.row)">删除</el-button>
+          <el-button type="text" size="small" @click.stop="handleDeleteList(scope.row)"
+            v-hasPermi="['material:order:remove']">删除</el-button>
           <el-button v-if="scope.row.status == '0' || scope.row.status == '3'" type="text" size="mini"
             @click.stop="handleSubmit(scope.row)">提交</el-button>
         </template>
@@ -346,16 +371,17 @@ export default {
 
     </el-table>
     <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :total="page.total"
-      :page-sizes="pageSizes" :page-size="page.pageSize" :current-page="page.pageNum" hide-on-single-page
-      :layout="layout">
+      :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>
 
     <el-tabs v-model="tabName" @tab-click="handleTabClick" style="width: 100%;padding: 20px 10px">
       <el-tab-pane v-for="(column, index) in tabColumns" :key="index" :label="column.title" :name="column.key">
-        <el-table :data="tabTableDatas[column.key]" style="width: 100%" highlight-current-row>
+        <el-table :data="tabTableDatas[column.key]" style="width: 100%" highlight-current-row
+          :height="tabTableDatas[column.key].length ? 300 : 100">
           <el-table-column type="index" width="50" label="序号"></el-table-column>
-          <el-table-column width="100" v-for="(cColumn, cIndex) in column.tableColumns" :key="cIndex" :prop="cColumn.key"
-            :label="cColumn.title">
+          <el-table-column v-for="(cColumn, cIndex) in column.tableColumns" :key="cIndex" :prop="cColumn.key"
+            :label="cColumn.title" :width="cColumn.width || 100" show-overflow-tooltip>
           </el-table-column>
         </el-table>
       </el-tab-pane>

+ 28 - 6
src/views/purchase/transferOrder/add.vue

@@ -249,7 +249,7 @@
           <el-table-column label="产地" align="center" prop="originPlaceName"/>
           <el-table-column label="型号" align="center" prop="model"/>
           <el-table-column label="单位" align="center" prop="unitName"/>
-          <el-table-column label="调出仓库" align="center" prop="deliveryWarehouseName"/>
+          <!-- <el-table-column label="调出仓库" align="center" prop="deliveryWarehouseName"/> -->
           <el-table-column label="数量" align="center" prop="qty" width="150px">
             <template slot-scope="scope">
               <el-form-item class="hang">
@@ -267,10 +267,22 @@
             </template>
           </el-table-column>
           <el-table-column label="税率" align="center" prop="rate"/>
-          <el-table-column label="调入仓库" align="center" prop="storageWarehouseName"/>
+          <!-- <el-table-column label="调入仓库" align="center" prop="storageWarehouseName"/> -->
           <el-table-column label="批次号" align="center" prop="patchNo"/>
           <el-table-column label="产品批号" align="center" prop="producBatch"/>
-          <el-table-column label="生产日期" align="center" prop="manufactureDate"/>
+          <el-table-column label="生产日期" align="center" prop="manufactureDate" width="230px">
+            <template slot-scope="scope">
+              <el-form-item class="hang">
+                <el-date-picker
+                  v-model="scope.row.manufactureDate"
+                  :readonly="sonDisable"
+                  type="date"
+                  size="small"
+                  value-format="yyyy-MM-dd">
+                </el-date-picker>
+              </el-form-item>
+            </template>
+          </el-table-column>
           <el-table-column label="有效期至/失效日期" align="center" prop="periodEndDate"/>
           <el-table-column label="批准文号" align="center" prop="ratifyCode"/>
           <el-table-column label="注册证号" align="center" prop="registration"/>
@@ -280,9 +292,16 @@
           <el-table-column label="调入调出结算规则明细" align="center" prop="ruleDetail"/>
           <el-table-column label="上市许可持有人" align="center" prop="marketingApprovalPersonal"/>
           <el-table-column label="生产许可证号/经营许可证号/备案凭证号" align="center" prop="production"/>
-          <el-table-column label="pi码" align="center" prop="pi"/>
+          <el-table-column label="pi码" align="center" prop="pi">
+            <template slot-scope="scope">
+              <el-form-item class="hang">
+                <el-input :readonly="sonDisable" size="small" v-model="scope.row.pi"/>
+              </el-form-item>
+            </template>
+          </el-table-column>
           <!-- <el-table-column label="无税金额" align="center" prop="code"/> -->
           <!-- <el-table-column label="备注" align="center" prop="code"/> -->
+          <el-table-column label="类别" align="center" prop="classify"/>
           <el-table-column label="客户物料码" align="center" prop="customerLogistic"/>
           <el-table-column label="客户物料名称" align="center" prop="customerLogisticName"/>
           <el-table-column
@@ -678,9 +697,9 @@ export default {
         qty: null,
         mainUnit: null,
         mainUnitName: null,
-        equation: null,
+        equation: '1/1',
         mainQty: null,
-        rate: null,
+        rate: '0.00',
         storageWarehouseName: null,
         patchNo: null,
         producBatch: null,
@@ -695,6 +714,7 @@ export default {
         marketingApprovalPersonal: null,
         production: null,
         pi: null,
+        classify: null,
         customerLogistic: null,
         customerLogisticName: null
       }
@@ -768,6 +788,8 @@ export default {
       this.materialInfo[this.tableIndex].unitName = selection[0].unitIdName
       this.materialInfo[this.tableIndex].mainUnitName = selection[0].unitIdName
       this.materialInfo[this.tableIndex].manufacturer = selection[0].manufacturerIdName
+      this.materialInfo[this.tableIndex].marketingApprovalPersonal = selection[0].registrant
+      this.materialInfo[this.tableIndex].production = selection[0].productionPermit
     },
   }
 }

+ 2 - 2
vue.config.js

@@ -37,12 +37,12 @@ module.exports = {
       // detail: https://cli.vuejs.org/config/#devserver-proxy
       [process.env.VUE_APP_BASE_API]: {
         // target: `http://172.16.100.107:8080/drp-admin`, //测试
-        // target: `http://test-sy.derom.com/drp-admin`, //测试
+        target: `http://test-sy.derom.com/drp-admin`, //测试
         // target: `http://release-sy.derom.com/drp-admin`, //预发
         // target: `http://sy.derom.com/drp-admin`, //生产
         // target: `http://172.16.63.202:8000/drp-admin`, // D本地
         // target: `http://172.16.62.241:8000/drp-admin`, //笑寒本地
-        target: `http://172.16.13.152:8000/drp-admin`, //豪哥本地
+        // target: `http://172.16.13.152:8000/drp-admin`, //豪哥本地
         // target: `http://172.16.13.47:8000/drp-admin`, //石杨本地
         // target: `http://172.16.13.113:8000/drp-admin`, //DWT本地
         // target: `http://172.16.13.77:8000/drp-admin`, //TQ本地