whj 1 year ago
parent
commit
15aff7665d

+ 19 - 106
src/views/purchase/purchase-order-page/PurchaseOrderPage.vue

@@ -45,8 +45,7 @@
         showPagination="auto"
       >
         <span slot="action" slot-scope="record">
-          <template>
-          </template>
+
         </span>
       </s-table>
     </div>
@@ -84,38 +83,31 @@ export default {
             return `${(this.$refs.table.localPagination.current - 1) * this.$refs.table.localPagination.pageSize + index + 1}`
           }
         },
+
         {
-          title: '单号',
-          dataIndex: 'billNo',
-          checked: true,
-          width: 200
-        },
-        {
-          title: '公司名称',
-          dataIndex: 'companyName',
+          title: '采购计划名称',
+          dataIndex: 'orderName',
           checked: true,
           width: 150
         },
+
         {
-          title: '项目名称',
-          dataIndex: 'projectName',
+          title: '设备位号',
+          dataIndex: 'positionNo',
           checked: true,
           width: 150
         },
         {
-          title: '采购员名称',
-          dataIndex: 'purchaserName',
+          title: '备件数',
+          dataIndex: 'totalNum',
           checked: true,
           width: 150
         },
         {
-          title: '项目记账币种',
-          dataIndex: 'projectMoneyType',
+          title: '创建人',
+          dataIndex: 'createdUserName',
           checked: true,
-          width: 120,
-          customRender: (text, record, index) => {
-            return this.BaseTool.Table.getMapText(this.moneyTypeMap, text)
-          }
+          width: 150
         },
         {
           title: '类型',
@@ -127,91 +119,14 @@ export default {
           }
         },
         {
-          title: '需求日期',
-          dataIndex: 'demandDate',
+          title: '更新日期',
+          dataIndex: 'updateTime',
           checked: true,
           width: 150
         },
-
-        {
-          title: '预计总金额',
-          dataIndex: 'originMoney',
-          checked: true,
-          width: 120,
-          customRender: (text, record, index) => {
-            let dollarExchangeRate = 1
-            if (record.projectMoneyType === this.DictCache.VALUE.MONEY_TYPE.RMB) {
-              dollarExchangeRate = this.dollarExchangeRate
-            }
-            return this.BaseTool.Amount.formatter(text) + this.BaseTool.Number.divForDollar(text, dollarExchangeRate, 2)
-          }
-        },
-        {
-          title: '实际总金额(按记账主币)',
-          dataIndex: 'accountMoney',
-          checked: true,
-          width: 120,
-          customRender: (text, record, index) => {
-            let dollarExchangeRate = 1
-            if (record.projectMoneyType === this.DictCache.VALUE.MONEY_TYPE.RMB) {
-              dollarExchangeRate = this.dollarExchangeRate
-            }
-            return this.BaseTool.Amount.formatter(text) + this.BaseTool.Number.divForDollar(text, dollarExchangeRate, 2)
-          }
-        },
-        {
-          title: '实际总金额(按询价主币)',
-          dataIndex: 'money',
-          checked: true,
-          width: 120,
-          customRender: (text, record, index) => {
-            return this.BaseTool.Amount.formatter(text) + this.BaseTool.Table.getMapTextForMoneyType(this.moneyTypeMap, record.moneyType)
-          }
-        },
-        {
-          title: '总费用(按记账主币,含发运)',
-          dataIndex: 'accountTotalMoney',
-          checked: true,
-          width: 150,
-          customRender: (text, record, index) => {
-            let dollarExchangeRate = 1
-            if (record.projectMoneyType === this.DictCache.VALUE.MONEY_TYPE.RMB) {
-              dollarExchangeRate = this.dollarExchangeRate
-            }
-            return this.BaseTool.Amount.formatter(text) + this.BaseTool.Number.divForDollar(text, dollarExchangeRate, 2)
-          }
-        },
-        // {
-        //   title: '总费用(按询价主币)',
-        //   dataIndex: 'totalMoney',
-        //   checked: true,
-        //   width: 120,
-        //   customRender: (text, record, index) => {
-        //     return this.BaseTool.Amount.formatter(text) + this.BaseTool.Table.getMapTextForMoneyType(this.moneyTypeMap, record.moneyType)
-        //   }
-        // },
-        {
-          title: '数量',
-          dataIndex: 'quantity',
-          checked: true,
-          width: 90,
-          customRender: (text, record, index) => {
-            return this.BaseTool.Amount.formatter(text)
-          }
-        },
-        {
-          title: '状态',
-          dataIndex: 'status',
-          checked: true,
-          fixed: 'right',
-          width: 100,
-          customRender: (text, record, index) => {
-            return this.BaseTool.Table.statusCustomRenderDict(this, text, record,
-              this.DictCache.COLOR.PURCHASE_ORDER_STATUS, this.statusMap)
-          }
-        },
         {
           title: '备注',
+          checked: true,
           width: 100,
           dataIndex: 'remark'
         },
@@ -233,15 +148,12 @@ export default {
       moneyTypeMap: {},
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
-        const user = this.$store.getters.userInfo
-        const roleCodes = user.roleCodes.join(',')
         parameter = {
           ...parameter,
           ...this.queryParam,
-          projectId: roleCodes.indexOf('FGS_') > -1 ? null : user.projectId,
           dataScope: {
-            sortBy: 'asc,desc',
-            sortName: 'status,update_time'
+            sortBy: 'desc',
+            sortName: 'update_time'
           }
         }
         return getPurchaseOrderPage2(Object.assign(parameter, this.queryParam))
@@ -264,7 +176,8 @@ export default {
   },
   created () {
     // 下拉框map
-    this.typeMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.PURCHASE_APPLY_TYPE)
+    this.typeMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.LONG_YAN_PURCHASE_TYPE)
+
     this.statusMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.PURCHASE_ORDER_STATUS)
     this.payTypeMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.PURCHASE_PAY_TYPE)
     this.invoiceTypeMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.PURCHASE_INVOICE_TYPE)

+ 1 - 1
src/views/purchase/purchase-order-page/modules/BaseForm.vue

@@ -27,7 +27,7 @@
               :labelCol="BaseTool.Constant.labelCol"
               :wrapperCol="BaseTool.Constant.wrapperCol"
             >
-              <a-input v-decorator="['name', {rules: [{required: true, message: '采购计划名称不能为空'}]}]" />
+              <a-input v-decorator="['orderName', {rules: [{required: true, message: '采购计划名称不能为空'}]}]" />
             </a-form-item>
           </a-col>
           <a-col :sm="20" >