Преглед на файлове

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

002201 преди 2 години
родител
ревизия
34f058fe33

+ 1 - 2
src/views/material/requisition/add.vue

@@ -152,8 +152,7 @@
             <el-row :gutter="20">
               <el-col :span="8">
                 <el-form-item label="序列号管理" prop="serialNoManager">
-                  <el-select v-model="basicForm.serialNoManager" placeholder="序列号管理" @change="stockControl"
-                    :disabled="disable">
+                  <el-select v-model="basicForm.serialNoManager" placeholder="序列号管理" :disabled="disable || isStock">
                     <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value" />
                   </el-select>
                 </el-form-item>

+ 24 - 10
src/views/purchase/PurchaseDemandList/add.vue

@@ -16,7 +16,7 @@
 
         <el-col :span="1.5">
             <el-form-item label="组织">
-              <el-select size="small" v-model="basicForm.org" :disabled="sonDisable" @focus="chooseOrg('ORG_PARAM', true, '选择组织')" style="width: 200px">
+              <el-select clearable size="small" v-model="basicForm.org" :disabled="sonDisable" @focus="chooseOrg('ORG_PARAM', true, '选择组织')" style="width: 200px">
                 <el-option v-for="item in orgOptions" :key="item.id" :label="item.name" :value="item.id" />
               </el-select>
             </el-form-item>
@@ -42,7 +42,7 @@
 
          <el-col :span="1.5">
             <el-form-item label="需求客户">
-              <el-select size="small" v-model="basicForm.customer" :disabled="sonDisable" @focus="chooseOrg('CUSTOMER_PARAM', true, '选择客户')" style="width: 200px">
+              <el-select clearable size="small" v-model="basicForm.customer" :disabled="sonDisable" @focus="chooseOrg('CUSTOMER_PARAM', true, '选择客户')" style="width: 200px">
                 <el-option v-for="item in customerOptions" :key="item.id" :label="item.name" :value="item.id" />
               </el-select>
             </el-form-item>
@@ -62,7 +62,7 @@
 
          <el-col :span="1.5">
             <el-form-item label="需求人员">
-                <el-select size="small" v-model="basicForm.demandPersonal" :disabled="sonDisable" @focus="chooseOrg('CONTACTS_PARAM', true, '需求人员')" style="width: 200px">
+                <el-select clearable size="small" v-model="basicForm.demandPersonal" :disabled="sonDisable" @focus="chooseOrg('CONTACTS_PARAM', true, '需求人员')" style="width: 200px">
                   <el-option v-for="item in personOptions" :key="item.id" :label="item.name" :value="item.code" />
                 </el-select>
             </el-form-item>
@@ -70,7 +70,7 @@
 
          <el-col :span="1.5">
             <el-form-item label="需求部门">
-              <el-select v-model="basicForm.demandDept" size="small" :disabled="sonDisable" @focus="chooseOrg('DEPT_PARAM', true, '需求部门')" style="width: 200px">
+              <el-select clearable v-model="basicForm.demandDept" size="small" :disabled="sonDisable" @focus="chooseOrg('DEPT_PARAM', true, '需求部门')" style="width: 200px">
                 <el-option
                   v-for="item in deptOptions"
                   :key="item.id"
@@ -86,6 +86,7 @@
               <el-date-picker
                 v-model="basicForm.demandDate"
                 :disabled="sonDisable"
+                clearable
                 type="date"
                 value-format="yyyy-MM-dd"
                 size="small"
@@ -106,7 +107,7 @@
 
          <el-col :span="1.5">
             <el-form-item label="业务类型">
-              <el-select v-model="basicForm.billType" :disabled="sonDisable" size="small" style="width: 200px">
+              <el-select clearable v-model="basicForm.billType" @change="changeBillType" :disabled="sonDisable" size="small" style="width: 200px">
                 <el-option v-for=" dict in dict.type.sys_business" :key="dict.value" :label="dict.label" :value="dict.value">
                 </el-option>
               </el-select>
@@ -115,7 +116,7 @@
 
           <el-col :span="1.5">
             <el-form-item label="是否客户指定">
-              <el-select v-model="basicForm.isSpeical" :disabled="sonDisable" size="small" style="width: 200px">
+              <el-select clearable v-model="basicForm.isSpeical" :disabled="sonDisable" size="small" style="width: 200px">
                 <el-option v-for=" item in options" :key="item.value" :label="item.label" :value="item.value">
                 </el-option>
               </el-select>
@@ -288,7 +289,7 @@
               <el-form-item class="hang">
                 <el-switch
                   v-model="scope.row.isReplenishment"
-                  :disabled="sonDisable"
+                  disabled
                   active-value="Y"
                   inactive-value="N"
                   active-color="#13ce66"
@@ -354,7 +355,7 @@
               <el-form-item class="hang">
                 <el-switch
                   v-model="scope.row.isUrgency"
-                  :disabled="sonDisable"
+                  disabled
                   active-value="Y"
                   inactive-value="N"
                   active-color="#13ce66"
@@ -556,6 +557,19 @@ export default {
     }
   },
   methods: {
+    // 更改业务类型调整明细行内补单或紧急标识
+    changeBillType() {
+      if (this.basicForm.billType == 'BDXQ' && this.basicForm.puDemandItemList.length != 0) {
+        this.basicForm.puDemandItemList.forEach(item => {item.isReplenishment = 'Y'})
+      } else {
+        this.basicForm.puDemandItemList.forEach(item => { item.isReplenishment = 'N' })
+      }
+      if (this.basicForm.billType == 'JJXQ' && this.basicForm.puDemandItemList.length != 0) {
+        this.basicForm.puDemandItemList.forEach(item => {item.isUrgency = 'Y'})
+      } else {
+        this.basicForm.puDemandItemList.forEach(item => { item.isUrgency = 'N' })
+      }
+    },
     hangStatus(row) {
       switch (row.status) {
         case '0':
@@ -677,8 +691,8 @@ export default {
         demandPeriod: null,
         forecastClassify: null,
         deliveryDate: null,
-        isUrgency: 'N',
-        isReplenishment: 'N',
+        isUrgency: this.basicForm.billType == 'JJXQ' ? 'Y' : 'N',
+        isReplenishment: this.basicForm.billType == 'BDXQ'? 'Y': 'N',
         isBatchLock: 'N',
         remark: null,
         puRemark: null,

+ 125 - 38
src/views/purchase/purchase-order/column.js

@@ -1,62 +1,100 @@
+import {
+  initPage,
+  initLayout,
+  initPageSizes,
+  initParams,
+  initColumns,
+  initDicts,
+} from "@/utils/init";
+
 export const TableColumns = [
   // { key: "id", title: "主键" },
   // { key: "puOrg", title: "采购组织" },
-  { key: "puOrgName", title: "采购组织名称", search: true, type: "Input" },
+  { key: "puOrgName", title: "采购组织名称", search: true, inputType: "Input" },
   {
     key: "billType",
     title: "订单类型",
     inputType: "Select",
     referName: "sys_order_type",
   },
-  { key: "code", title: "订单编号", search: true, type: "Input" },
+  { key: "code", title: "订单编号", search: true, inputType: "Input" },
   { key: "billDate", title: "订单日期" },
   // { key: "supplier", title: "供应商" },
-  { key: "supplierName", title: "供应商名称", search: true, type: "Input" },
-  { key: "paymentAgreement", title: "付款协议" },
+  { key: "supplierName", title: "供应商", search: true, inputType: "Input" },
+  { key: "paymentAgreementName", title: "付款协议" },
+  // { key: "paymentAgreement", title: "付款协议" },
   // { key: "currency", title: "币种" },
-  { key: "currencyName", title: "币种名称" },
-  // { key: "buyer", title: "采购员" },
+  { key: "currencyName", title: "币种" },
+  // { key: "buyer", title: "采购员" },ut
   { key: "buyerName", title: "采购员" },
   // { key: "puDept", title: "采购部门" },
-  { key: "puDeptName", title: "采购部门名称" },
+  { key: "puDeptName", title: "采购部门" },
   // { key: "customer", title: "收货客户" },
-  { key: "customerName", title: "收货客户名称" },
+  { key: "customerName", title: "收货客户" },
   { key: "isDeliver", title: "是否发货" },
-  { key: "isArrival", title: "到货超期" },
-  { key: "isBack", title: "退货" },
+  {
+    key: "isArrival",
+    title: "到货超期",
+    inputType: 'Checkbox',
+  },
+  {
+    key: "isBack",
+    title: "退货",
+    inputType: 'Checkbox',
+  },
   // { key: "freezeCause", title: "冻结原因" },
   { key: "qty", title: "总数量" },
   { key: "money", title: "总数量" },
-  { key: "isMarketing", title: "已协同生成销售订单" },
-  { key: "isMarketingSource", title: "由销售订单协同生成" },
+  {
+    key: "isMarketing",
+    title: "已协同生成销售订单",
+    inputType: 'Checkbox',
+  },
+  {
+    key: "isMarketingSource",
+    title: "由销售订单协同生成",
+    inputType: 'Checkbox',
+  },
   // { key: "personal", title: "人员" },
-  { key: "personalName", title: "人员名称" },
+  { key: "personalName", title: "人员" },
   // { key: "isSendSrm", title: "是否同步SRM" },
-  { key: "isInvoice", title: "发票标识" },
+  {
+    key: "isInvoice",
+    title: "发票标识",
+    inputType: 'Checkbox',
+  },
   { key: "rebateMoney", title: "订单使用返利金额" },
   { key: "deductionMoney", title: "订单抵扣余款金额" },
   // { key: "warehouse", title: "WMS入库仓库" },
   { key: "warehouseName", title: "收货仓库" }, //WMS入库仓库名称
   // { key: "goodsAllocation", title: "货位" },
-  { key: "goodsAllocationName", title: "货位名称" },
+  { key: "goodsAllocationName", title: "货位" },
   // { key: "customerDept", title: "客户部门" },
-  { key: "customerDeptName", title: "客户部门名称" },
+  { key: "customerDeptName", title: "客户部门" },
   // { key: "supplierContacts", title: "供应商业务联系人" },
-  { key: "supplierContactsName", title: "供应商业务联系人名称" },
-  { key: "isUrgency", title: "紧急程度" },
+  { key: "supplierContactsName", title: "供应商业务联系人" },
+  {
+    key: "isUrgency",
+    title: "紧急程度",
+    inputType: 'Checkbox',
+  },
   // { key: "agent", title: "代理人" }, // 建议删除
-  { key: "agentName", title: "代理人名称" },
-  { key: "isClose", title: "最终关闭" },
+  { key: "agentName", title: "代理人" },
+  {
+    key: "isClose",
+    title: "最终关闭",
+    inputType: 'Checkbox',
+  },
   { key: "applyPaymentMoney", title: "累计付款申请金额" },
   { key: "paymentMoney", title: "累计付款金额" },
   { key: "invoiceMoney", title: "发票金额" },
   // { key: "supplierPersonal", title: "供应商业务员" },
-  { key: "supplierPersonalName", title: "供应商业务员名称" },
+  { key: "supplierPersonalName", title: "供应商业务员" },
   { key: "marketingCode", title: "销售订单号" },
   // { key: "tenantId", title: "租户号" },
   // { key: "revision", title: "乐观锁" },
-  { key: "createByName", title: "创建人名称" },
-  { key: "updateByName", title: "更新人名称" },
+  { key: "createByName", title: "创建人" },
+  { key: "updateByName", title: "更新人" },
   // { key: "delFlag", title: "删除标记" },
   { key: "flowId", title: "OA流程ID" },
   { key: "approver", title: "审批人" },
@@ -74,7 +112,11 @@ export const TableColumns = [
   { key: "oaDemandNo", title: "OA需求单号" },
   { key: "address", title: "收货地址" },
   { key: "contacts", title: "收获联系人" },
-  { key: "isSendWms", title: "已同步WMS" },
+  {
+    key: "isSendWms",
+    title: "已同步WMS",
+    inputType: 'Checkbox',
+  },
   { key: "retReason", title: "退换原因" },
   { key: "closeTime", title: "最终关闭日期" },
   { key: "processType", title: "处理方式" },
@@ -99,7 +141,12 @@ export const TabColumns = [
       { key: "materialManufacturersCode", title: "厂家物料编码", width: 180 },
       { key: "specification", title: "规格", width: 180 },
       { key: "model", title: "型号", width: 180 },
-      { key: "isMedcine", title: "医药物料", width: 180 },
+      {
+        key: "isMedcine",
+        title: "医药物料",
+        width: 180,
+        inputType: 'Checkbox',
+      },
       { key: "manufacturer", title: "生产厂家代理人", width: 180 },
       { key: "isDrug", title: "物料药品属性", width: 180 },
       { key: "unit", title: "单位", width: 180 },
@@ -112,11 +159,31 @@ export const TabColumns = [
       { 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: "isStorage",
+        title: "入库关闭",
+        inputType: 'Checkbox',
+      },
+      {
+        key: "isInvoice",
+        title: "开票关闭",
+        inputType: 'Checkbox',
+      },
+      {
+        key: "isArrival",
+        title: "到货关闭",
+        inputType: 'Checkbox',
+      },
+      {
+        key: "isPayment",
+        title: "付款关闭",
+        inputType: 'Checkbox',
+      },
+      {
+        key: "isGift",
+        title: "赠品",
+        inputType: 'Checkbox',
+      },
       { key: "warehouse", title: "收货仓库", width: 180 },
       { key: "place", title: "收货地点", width: 180 },
       { key: "address", title: "收货地址", width: 180 },
@@ -137,8 +204,16 @@ export const TabColumns = [
         inputType: "Select",
         referName: "sys_conditions_carriage", // 字典名
       },
-      { key: "isBatchLock", title: "批号锁定标识" },
-      { key: "isReplenishment", title: "补单标识" },
+      {
+        key: "isBatchLock",
+        title: "批号锁定标识",
+        inputType: 'Checkbox',
+      },
+      {
+        key: "isReplenishment",
+        title: "补单标识",
+        inputType: 'Checkbox',
+      },
       { key: "isUrgency", title: "紧急标识" },
       { key: "originalQty", title: "原始数量" },
       { key: "originalMoney", title: "原始金额" },
@@ -161,17 +236,17 @@ export const TabColumns = [
       { key: "isDistributionPrice", title: "配送价" },
       // { key: "tenantId", title: "租户号" },
       // { key: "revision", title: "乐观锁" },
-      { key: "createByName", title: "创建人名称" },
-      { key: "updateByName", title: "更新人名称" },
+      { key: "createByName", title: "创建人" },
+      { key: "updateByName", title: "更新人" },
       // { key: "delFlag", title: "删除标记" },
       // { key: "materialClassifyOne", title: "物料一级分类" },
-      { key: "materialClassifyOneName", title: "物料一级分类名称", width: 180 },
+      { key: "materialClassifyOneName", title: "物料一级分类", width: 180 },
       // { key: "materialClassifyTwo", title: "物料二级分类" },
-      { key: "materialClassifyTwoName", title: "物料二级分类名称", width: 180 },
+      { key: "materialClassifyTwoName", title: "物料二级分类", width: 180 },
       // { key: "materialClassifyThree", title: "物料三级分类" },
-      { key: "materialClassifyThreeName", title: "物料三级分类名称", width: 180 },
+      { key: "materialClassifyThreeName", title: "物料三级分类", width: 180 },
       // { key: "materialClassifyFour", title: "物料四级分类" },
-      { key: "materialClassifyFourName", title: "物料四级分类名称", width: 180 },
+      { key: "materialClassifyFourName", title: "物料四级分类", width: 180 },
       { key: "price", title: "无税单价" }
     ]
   },
@@ -202,3 +277,15 @@ export const TabColumns = [
 ];
 
 export const SearchColumns = TableColumns.filter((element) => element.search);
+
+const NewColumns = initColumns(TableColumns);
+const NewTabColumns = TabColumns.map((element) => ({
+  ...element,
+  tableColumns: initColumns(element.tableColumns),
+}));
+// 
+export const SelectColumns = NewColumns.filter(column => column.inputType === 'Select')
+
+NewTabColumns.forEach(column => {
+  SelectColumns.push(...column.tableColumns.filter(cColumn => cColumn.inputType === 'Select'))
+});

+ 19 - 17
src/views/purchase/purchase-order/index.vue

@@ -1,6 +1,6 @@
 <!-- 采购订单修订—— 列表 -->
 <script>
-import { TableColumns, SearchColumns, TabColumns } from "./column";
+import { TableColumns, SearchColumns, TabColumns, SelectColumns } from "./column";
 import orderApi from "@/api/business/purchase/purchase-order";
 import {
   initPage,
@@ -10,19 +10,7 @@ import {
   initColumns,
   initDicts,
 } from "@/utils/init";
-import { finished } from "stream";
-
-const NewColumns = initColumns(TableColumns);
-const NewTabColumns = TabColumns.map((element) => ({
-  ...element,
-  tableColumns: initColumns(element.tableColumns),
-}));
-// 
-const SelectColumns = NewColumns.filter(column => column.inputType === 'Select')
-NewTabColumns.forEach(column => {
-  SelectColumns.push(...column.tableColumns.filter(cColumn => cColumn.inputType === 'Select'))
-});
-console.log(SelectColumns, 'SelectColumns------------');
+
 
 export default {
   name: "PuchaseOrder",
@@ -52,6 +40,7 @@ export default {
         puOrderExecuteList: [],
       },
       checkedList: [],
+      checkedTabList: [],
     };
   },
   computed: {
@@ -279,6 +268,11 @@ export default {
 
     },
 
+    handleTabSelect(selection, row) {
+      this.checkedTabList = selection; 
+    },
+
+
   },
 };
 </script>
@@ -345,9 +339,14 @@ export default {
       <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">
+
         <template slot-scope="scope">
           <dict-tag v-if="column.referName" size="small" :value="scope.row[column.key]"
             :options="dict.type[column.referName]" />
+
+          <el-checkbox v-else-if="column.inputType === 'Checkbox'" v-model="scope.row[column.key]" disabled true-label="Y"
+            false-label="N">
+          </el-checkbox>
           <span v-else>{{ scope.row[column.key] }}</span>
         </template>
       </el-table-column>
@@ -373,17 +372,20 @@ export default {
 
     <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
-          :height="tabTableDatas[column.key].length ? 300 : 100">
 
+        <el-table :data="tabTableDatas[column.key]" style="width: 100%" highlight-current-row @select="handleTabSelect"
+          :height="tabTableDatas[column.key].length ? 300 : 100">
+          <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="(cColumn, cIndex)  in column.tableColumns" :key="cIndex" :prop="cColumn.key"
             :label="cColumn.title" :width="cColumn.width || 180"
             :show-overflow-tooltip="cColumn.showOverflowTooltip || true">
             <template slot-scope="scope">
               <dict-tag v-if="cColumn.referName" size="small" :value="scope.row[cColumn.key]"
                 :options="dict.type[cColumn.referName]" />
+              <el-checkbox v-else-if="cColumn.inputType === 'Checkbox'" v-model="scope.row[cColumn.key]" disabled
+                true-label="Y" false-label="N">
+              </el-checkbox>
               <span v-else>{{ scope.row[cColumn.key] }}</span>
             </template>
           </el-table-column>

+ 1 - 1
vue.config.js

@@ -37,7 +37,7 @@ 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本地