lilei před 4 roky
rodič
revize
905f067e2a

+ 197 - 197
src/config/router.config.js

@@ -183,64 +183,64 @@ export const asyncRouterMap = [
               }
             ]
           },
-          // {
-          //   path: '/salesManagement/salesReturn',
-          //   redirect: '/salesManagement/salesReturn/list',
-          //   name: 'salesReturn',
-          //   component: RouteView,
-          //   meta: {
-          //     title: '销售退货',
-          //     icon: 'fund'
-          //     // permission: 'M_salesReturn_list'
-          //   },
-          //   hideChildrenInMenu: true,
-          //   children: [
-          //     {
-          //       path: 'list',
-          //       name: 'salesReturnList',
-          //       component: () => import(/* webpackChunkName: "salesManagement" */ '@/views/salesManagement/salesReturn/list.vue'),
-          //       meta: {
-          //         title: '退货单列表',
-          //         icon: 'fund',
-          //         hidden: true
-          //         // permission: 'M_salesReturn_list'
-          //       }
-          //     },
-          //     {
-          //       path: 'detail/:id/:sn',
-          //       name: 'salesReturnDetail',
-          //       component: () => import(/* webpackChunkName: "salesManagement" */ '@/views/salesManagement/salesReturn/detail.vue'),
-          //       meta: {
-          //         title: '退货单详情',
-          //         icon: 'fund',
-          //         hidden: true
-          //         // permission: 'M_salesReturn'
-          //       }
-          //     },
-          //     {
-          //       path: 'salesReturnNew',
-          //       name: 'salesReturnNew',
-          //       component: () => import(/* webpackChunkName: "salesManagement" */ '@/views/salesManagement/salesReturn/salesReturnNew.vue'),
-          //       meta: {
-          //         title: '新增退货单',
-          //         icon: 'fund',
-          //         hidden: true
-          //         // permission: 'M_salesReturnNew'
-          //       }
-          //     },
-          //     {
-          //       path: 'salesReturnEdit/:id',
-          //       name: 'salesReturnEdit',
-          //       component: () => import(/* webpackChunkName: "salesManagement" */ '@/views/salesManagement/salesReturn/salesReturnNew.vue'),
-          //       meta: {
-          //         title: '编辑退货单',
-          //         icon: 'fund',
-          //         hidden: true
-          //         // permission: 'M_salesReturnEdit'
-          //       }
-          //     }
-          //   ]
-          // },
+          {
+            path: '/salesManagement/salesReturn',
+            redirect: '/salesManagement/salesReturn/list',
+            name: 'salesReturn',
+            component: RouteView,
+            meta: {
+              title: '销售退货',
+              icon: 'fund'
+              // permission: 'M_salesReturn_list'
+            },
+            hideChildrenInMenu: true,
+            children: [
+              {
+                path: 'list',
+                name: 'salesReturnList',
+                component: () => import(/* webpackChunkName: "salesManagement" */ '@/views/salesManagement/salesReturn/list.vue'),
+                meta: {
+                  title: '退货单列表',
+                  icon: 'fund',
+                  hidden: true
+                  // permission: 'M_salesReturn_list'
+                }
+              },
+              {
+                path: 'detail/:id/:sn',
+                name: 'salesReturnDetail',
+                component: () => import(/* webpackChunkName: "salesManagement" */ '@/views/salesManagement/salesReturn/detail.vue'),
+                meta: {
+                  title: '退货单详情',
+                  icon: 'fund',
+                  hidden: true
+                  // permission: 'M_salesReturn'
+                }
+              },
+              {
+                path: 'salesReturnNew',
+                name: 'salesReturnNew',
+                component: () => import(/* webpackChunkName: "salesManagement" */ '@/views/salesManagement/salesReturn/salesReturnNew.vue'),
+                meta: {
+                  title: '新增退货单',
+                  icon: 'fund',
+                  hidden: true
+                  // permission: 'M_salesReturnNew'
+                }
+              },
+              {
+                path: 'salesReturnEdit/:id',
+                name: 'salesReturnEdit',
+                component: () => import(/* webpackChunkName: "salesManagement" */ '@/views/salesManagement/salesReturn/salesReturnNew.vue'),
+                meta: {
+                  title: '编辑退货单',
+                  icon: 'fund',
+                  hidden: true
+                  // permission: 'M_salesReturnEdit'
+                }
+              }
+            ]
+          },
           // {    二期
           //   path: '/salesManagement/quotation',
           //   redirect: '/salesManagement/quotation/list',
@@ -327,145 +327,145 @@ export const asyncRouterMap = [
         ]
       },
       // 采购管理
-      // {
-      //   path: '/purchasingManagement',
-      //   redirect: '/purchasingManagement/purchaseOrder',
-      //   component: PageView,
-      //   meta: {
-      //     title: '采购管理',
-      //     icon: 'money-collect'
-      //     // permission: 'M_shop'
-      //   },
-      //   children: [
-          //     {
-          //       path: '/purchasingManagement/purchaseOrder',
-          //       redirect: '/purchasingManagement/purchaseOrder/list',
-          //       name: 'purchaseOrder',
-          //       component: RouteView,
-          //       meta: {
-          //         title: '采购单管理',
-          //         icon: 'money-collect'
-          //         // permission: 'M_goodsManage_list'
-          //       },
-          //       hideChildrenInMenu: true,
-          //       children: [
-          //         {
-          //           path: 'list',
-          //           name: 'purchaseOrderList',
-          //           component: () => import(/* webpackChunkName: "shop" */ '@/views/purchasingManagement/purchaseOrder/list.vue'),
-          //           meta: {
-          //             title: '采购单列表',
-          //             icon: 'money-collect',
-          //             hidden: true
-          //             // permission: 'M_goodsManage_list'
-          //           }
-          //         },
-          //         {
-          //           path: 'add',
-          //           name: 'purchaseOrderAdd',
-          //           component: () => import(/* webpackChunkName: "shop" */ '@/views/purchasingManagement/purchaseOrder/edit.vue'),
-          //           meta: {
-          //             title: '新增采购单',
-          //             icon: 'money-collect',
-          //             hidden: true
-          //             // permission: 'B_goodsManage_edit'
-          //           }
-          //         },
-          //         {
-          //           path: 'edit/:id',
-          //           name: 'purchaseOrderEdit',
-          //           component: () => import(/* webpackChunkName: "shop" */ '@/views/purchasingManagement/purchaseOrder/edit.vue'),
-          //           meta: {
-          //             title: '编辑采购单',
-          //             icon: 'money-collect',
-          //             hidden: true
-          //             // permission: 'B_goodsManage_edit'
-          //           }
-          //         },
-          //         {
-          //           path: 'detail/:id',
-          //           name: 'purchaseOrderDetail',
-          //           component: () => import(/* webpackChunkName: "shop" */ '@/views/purchasingManagement/purchaseOrder/detail.vue'),
-          //           meta: {
-          //             title: '采购单详情',
-          //             icon: 'money-collect',
-          //             hidden: true
-          //             // permission: 'B_goodsManage_edit'
-          //           }
-          //         },
-          //         {
-          //           path: 'warehousing/:id',
-          //           name: 'purchaseOrderWarehousing',
-          //           component: () => import(/* webpackChunkName: "shop" */ '@/views/purchasingManagement/purchaseOrder/warehousing.vue'),
-          //           meta: {
-          //             title: '入库',
-          //             icon: 'money-collect',
-          //             hidden: true
-          //             // permission: 'B_goodsManage_edit'
-          //           }
-          //         }
-          //       ]
-          //     },
-          // {
-          //   path: '/purchasingManagement/purchaseReturn',
-          //   redirect: '/purchasingManagement/purchaseReturn/list',
-          //   name: 'purchaseReturn',
-          //   component: RouteView,
-          //   meta: {
-          //     title: '采购退货',
-          //     icon: 'money-collect'
-          //     // permission: 'M_goodsManage_list'
-          //   },
-          //   hideChildrenInMenu: true,
-          //   children: [
-          //     {
-          //       path: 'list',
-          //       name: 'purchaseReturnList',
-          //       component: () => import(/* webpackChunkName: "shop" */ '@/views/purchasingManagement/purchaseReturn/list.vue'),
-          //       meta: {
-          //         title: '采购退货列表',
-          //         icon: 'money-collect',
-          //         hidden: true
-          //         // permission: 'M_goodsManage_list'
-          //       }
-          //     },
-          //     {
-          //       path: 'add/:id/:sn',
-          //       name: 'purchaseReturnAdd',
-          //       component: () => import(/* webpackChunkName: "shop" */ '@/views/purchasingManagement/purchaseReturn/edit.vue'),
-          //       meta: {
-          //         title: '新增采购退货单',
-          //         icon: 'money-collect',
-          //         hidden: true
-          //         // permission: 'B_goodsManage_edit'
-          //       }
-          //     },
-          //     {
-          //       path: 'edit/:id/:sn',
-          //       name: 'purchaseReturnEdit',
-          //       component: () => import(/* webpackChunkName: "shop" */ '@/views/purchasingManagement/purchaseReturn/edit.vue'),
-          //       meta: {
-          //         title: '编辑采购退货单',
-          //         icon: 'money-collect',
-          //         hidden: true
-          //         // permission: 'B_goodsManage_edit'
-          //       }
-          //     },
-          //     {
-          //       path: 'detail/:sn',
-          //       name: 'purchaseReturnDetail',
-          //       component: () => import(/* webpackChunkName: "shop" */ '@/views/purchasingManagement/purchaseReturn/detail.vue'),
-          //       meta: {
-          //         title: '采购退货详情',
-          //         icon: 'money-collect',
-          //         hidden: true
-          //         // permission: 'B_goodsManage_edit'
-          //       }
-          //     }
-          //   ]
-          // }
-      //   ]
-      // },
+      {
+        path: '/purchasingManagement',
+        redirect: '/purchasingManagement/purchaseOrder',
+        component: PageView,
+        meta: {
+          title: '采购管理',
+          icon: 'money-collect'
+          // permission: 'M_shop'
+        },
+        children: [
+              {
+                path: '/purchasingManagement/purchaseOrder',
+                redirect: '/purchasingManagement/purchaseOrder/list',
+                name: 'purchaseOrder',
+                component: RouteView,
+                meta: {
+                  title: '采购单管理',
+                  icon: 'money-collect'
+                  // permission: 'M_goodsManage_list'
+                },
+                hideChildrenInMenu: true,
+                children: [
+                  {
+                    path: 'list',
+                    name: 'purchaseOrderList',
+                    component: () => import(/* webpackChunkName: "shop" */ '@/views/purchasingManagement/purchaseOrder/list.vue'),
+                    meta: {
+                      title: '采购单列表',
+                      icon: 'money-collect',
+                      hidden: true
+                      // permission: 'M_goodsManage_list'
+                    }
+                  },
+                  {
+                    path: 'add/:id',
+                    name: 'purchaseOrderAdd',
+                    component: () => import(/* webpackChunkName: "shop" */ '@/views/purchasingManagement/purchaseOrder/edit.vue'),
+                    meta: {
+                      title: '新增采购单',
+                      icon: 'money-collect',
+                      hidden: true
+                      // permission: 'B_goodsManage_edit'
+                    }
+                  },
+                  {
+                    path: 'edit/:id',
+                    name: 'purchaseOrderEdit',
+                    component: () => import(/* webpackChunkName: "shop" */ '@/views/purchasingManagement/purchaseOrder/edit.vue'),
+                    meta: {
+                      title: '编辑采购单',
+                      icon: 'money-collect',
+                      hidden: true
+                      // permission: 'B_goodsManage_edit'
+                    }
+                  },
+                  {
+                    path: 'detail/:id',
+                    name: 'purchaseOrderDetail',
+                    component: () => import(/* webpackChunkName: "shop" */ '@/views/purchasingManagement/purchaseOrder/detail.vue'),
+                    meta: {
+                      title: '采购单详情',
+                      icon: 'money-collect',
+                      hidden: true
+                      // permission: 'B_goodsManage_edit'
+                    }
+                  },
+                  {
+                    path: 'warehousing/:id',
+                    name: 'purchaseOrderWarehousing',
+                    component: () => import(/* webpackChunkName: "shop" */ '@/views/purchasingManagement/purchaseOrder/warehousing.vue'),
+                    meta: {
+                      title: '入库',
+                      icon: 'money-collect',
+                      hidden: true
+                      // permission: 'B_goodsManage_edit'
+                    }
+                  }
+                ]
+              },
+          {
+            path: '/purchasingManagement/purchaseReturn',
+            redirect: '/purchasingManagement/purchaseReturn/list',
+            name: 'purchaseReturn',
+            component: RouteView,
+            meta: {
+              title: '采购退货',
+              icon: 'money-collect'
+              // permission: 'M_goodsManage_list'
+            },
+            hideChildrenInMenu: true,
+            children: [
+              {
+                path: 'list',
+                name: 'purchaseReturnList',
+                component: () => import(/* webpackChunkName: "shop" */ '@/views/purchasingManagement/purchaseReturn/list.vue'),
+                meta: {
+                  title: '采购退货列表',
+                  icon: 'money-collect',
+                  hidden: true
+                  // permission: 'M_goodsManage_list'
+                }
+              },
+              {
+                path: 'add/:id/:sn',
+                name: 'purchaseReturnAdd',
+                component: () => import(/* webpackChunkName: "shop" */ '@/views/purchasingManagement/purchaseReturn/edit.vue'),
+                meta: {
+                  title: '新增采购退货单',
+                  icon: 'money-collect',
+                  hidden: true
+                  // permission: 'B_goodsManage_edit'
+                }
+              },
+              {
+                path: 'edit/:id/:sn',
+                name: 'purchaseReturnEdit',
+                component: () => import(/* webpackChunkName: "shop" */ '@/views/purchasingManagement/purchaseReturn/edit.vue'),
+                meta: {
+                  title: '编辑采购退货单',
+                  icon: 'money-collect',
+                  hidden: true
+                  // permission: 'B_goodsManage_edit'
+                }
+              },
+              {
+                path: 'detail/:sn',
+                name: 'purchaseReturnDetail',
+                component: () => import(/* webpackChunkName: "shop" */ '@/views/purchasingManagement/purchaseReturn/detail.vue'),
+                meta: {
+                  title: '采购退货详情',
+                  icon: 'money-collect',
+                  hidden: true
+                  // permission: 'B_goodsManage_edit'
+                }
+              }
+            ]
+          }
+        ]
+      },
       // 调拨管理
       {
         path: '/allocationManagement',

+ 88 - 27
src/views/purchasingManagement/purchaseOrder/basicInfoModal.vue

@@ -6,8 +6,8 @@
     :maskClosable="false"
     title="新增采购单"
     v-model="isShow"
-    @cancle="isShow=false"
-    width="80%">
+    @cancel="cancel"
+    width="50%">
     <a-form-model
       id="purchaseOrder-basicInfo-form"
       ref="ruleForm"
@@ -15,33 +15,32 @@
       :rules="rules"
       :label-col="formItemLayout.labelCol"
       :wrapper-col="formItemLayout.wrapperCol" >
-      <a-form-model-item label="供应商" prop="state">
+      <a-form-model-item label="供应商" prop="purchaseTragetType">
         <a-radio-group
           name="radioGroup"
-          v-model="form.state"
-          id="purchaseOrder-basicInfo-state" >
-          <a-radio :value="1">箭冠营销中心</a-radio>
-          <a-radio :value="0">支持省级</a-radio>
+          v-model="form.purchaseTragetType"
+          id="purchaseOrder-basicInfo-purchaseTragetType" >
+          <a-radio value="HQ">箭冠营销中心</a-radio>
+          <a-radio value="COMMON">支持省级</a-radio>
         </a-radio-group>
       </a-form-model-item>
-      <a-form-model-item label="支付方式" prop="sort">
-        <v-select
-          v-model="form.billStatus"
-          ref="billStatus"
-          id="purchaseOrder-basicInfo-billStatus"
-          code="PAYMENT_TYPE"
-          placeholder="请选择支付方式"
-          allowClear></v-select>
+      <a-form-model-item label="支付方式" prop="settleStyleSn">
+        <a-select placeholder="请选择支付方式" v-model="form.settleStyleSn">
+          <a-select-option v-for="item in settleStyleList" :key="item.settleStyleSn" :value="item.settleStyleSn">
+            {{ item.name }}
+          </a-select-option>
+        </a-select>
       </a-form-model-item>
-      <a-form-model-item label="收货地址" prop="name">
+      <a-form-model-item>
+        <span slot="label"><i style="color: red;">*</i> 收货地址</span>
         {{ chooseAddr }}
         <a-button type="link" id="purchaseOrder-basicInfo-chooseAddr" @click="handleChoose">{{ addressVal }} >></a-button>
       </a-form-model-item>
+      <a-form-model-item :wrapper-col="{ span: 12, offset: 6 }" style="text-align: center;">
+        <a-button type="primary" :loading="confirmLoading" @click="handleSubmit" id="chooseCustom-btn-submit">保存</a-button>
+        <a-button @click="cancel" style="margin-left: 15px" id="chooseCustom-btn-back">取消</a-button>
+      </a-form-model-item>
     </a-form-model>
-    <div class="btn-cont">
-      <a-button type="primary" id="purchaseOrder-basicInfo-modal-save" @click="handleSave">保存</a-button>
-      <a-button id="purchaseOrder-basicInfo-modal-back" @click="isShow = false" style="margin-left: 15px;">取消</a-button>
-    </div>
     <!-- 选择地址 -->
     <choose-address-modal :openModal="openAddrModal" @ok="handleOk" @close="openAddrModal=false" />
   </a-modal>
@@ -50,6 +49,8 @@
 <script>
 import { VSelect } from '@/components'
 import chooseAddressModal from './receivingAddress/chooseAddressModal.vue'
+import { settleStyleQueryAll } from '@/api/settleStyle'
+import { purchaseSave } from '@/api/purchase'
 export default {
   name: 'BasicInfoModal',
   components: { VSelect, chooseAddressModal },
@@ -61,18 +62,29 @@ export default {
   },
   data () {
     return {
+      confirmLoading: false,
       isShow: this.openModal, //  是否打开弹框
+      settleStyleList: [], // 支付方式
       formItemLayout: {
         labelCol: { span: 6 },
         wrapperCol: { span: 16 }
       },
       form: {
-        name: '', // 仓库名称
-        sort: '' //  排序
+        purchaseTragetType: '', // 供应商
+        shippingAddressProvinceName: '', // 省
+        shippingAddressCityName: '', // 市
+        shippingAddressCountyName: '', // 区
+        shippingAddress: '', // 详细地址
+        consigneeTel: '', // 联系电话
+        consigneeName: '', // 联系人名称
+        settleStyleSn: undefined //  支付方式
       },
       rules: {
-        name: [
-          { required: true, message: '请输入仓库名称', trigger: 'blur' }
+        purchaseTragetType: [
+          { required: true, message: '请选择供应商', trigger: 'change' }
+        ],
+        settleStyleSn: [
+          { required: true, message: '请选择支付方式', trigger: 'change' }
         ]
       },
       addressVal: '选择地址', //  选择地址/更换地址
@@ -82,9 +94,40 @@ export default {
   },
   methods: {
     //  保存
-    handleSave () {
+    handleSubmit (e) {
+      e.preventDefault()
+      const _this = this
+      this.$refs.ruleForm.validate(valid => {
+        if (valid) {
+          console.log(_this.form)
+          if (_this.form.consigneeTel == '') {
+            _this.$message.info('请选择收货地址')
+            return false
+          }
+          purchaseSave(_this.form).then(res => {
+            if (res.status == 200) {
+              _this.isShow = false
+              _this.$emit('ok', res.data)
+            }
+            _this.$message.info(res.message)
+          })
+        } else {
+          return false
+        }
+      })
+    },
+    // 取消
+    cancel () {
+      console.log(11)
       this.isShow = false
-      this.$emit('ok')
+      this.chooseAddr = ''
+      this.addressVal = '选择地址'
+      this.form.shippingAddressProvinceName = ''// 省
+      this.form.shippingAddressCityName = '' // 市
+      this.form.shippingAddressCountyName = '' // 区
+      this.form.shippingAddress = ''// 详细地址
+      this.form.consigneeTel = '' // 联系电话
+      this.form.consigneeName = ''
     },
     //  选择地址
     handleChoose () {
@@ -92,9 +135,24 @@ export default {
     },
     //  地址保存
     handleOk (data) {
-      this.chooseAddr = '张三(18800001111) 河南省 郑州市 中原区 大学科技园'
+      console.log(data)
+      this.chooseAddr = data.consigneeName + '(' + data.consigneeTel + ')' + ' ' + data.address
       this.addressVal = '更换地址'
+      this.form.shippingAddressProvinceName = data.provinceName // 省
+      this.form.shippingAddressCityName = data.cityName // 市
+      this.form.shippingAddressCountyName = data.countyName // 区
+      this.form.shippingAddress = data.addr// 详细地址
+      this.form.consigneeTel = data.consigneeTel // 联系电话
+      this.form.consigneeName = data.consigneeName
       this.openAddrModal = false
+    },
+    // 获取收款方式
+    getSettleStyle () {
+      settleStyleQueryAll().then(res => {
+        if (res.status == 200) {
+          this.settleStyleList = res.data
+        }
+      })
     }
   },
   watch: {
@@ -106,6 +164,9 @@ export default {
     isShow (newValue, oldValue) {
       if (!newValue) {
         this.$emit('close')
+        this.$refs.ruleForm.resetFields()
+      } else {
+        this.getSettleStyle()
       }
     }
   }

+ 9 - 3
src/views/purchasingManagement/purchaseOrder/edit.vue

@@ -1,9 +1,9 @@
 <template>
   <div class="purchaseOrderEdit-wrap">
-    <a-page-header :ghost="false" @back="handleBack" class="purchaseOrderEdit-cont">
+    <a-page-header :ghost="false" :backIcon="false" class="purchaseOrderEdit-cont">
       <!-- 自定义的二级文字标题 -->
       <template slot="subTitle">
-        <a id="purchaseOrderEdit-back-btn" href="javascript:;" @click="handleBack" style="vertical-align: top;">返回列表</a>
+        <a id="purchaseOrderEdit-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
         <p class="billno">单号:CG2021010100001</p>
       </template>
       <!-- 操作区,位于 title 行的行尾 -->
@@ -166,7 +166,13 @@
     </a-card>
     <a-affix :offset-bottom="0">
       <div style="text-align: center;width: 100%;background-color: #fff;padding: 12px 0;box-shadow: 0 0 20px #dcdee2;">
-        <a-button type="primary" id="purchaseOrderEdit-submit-btn" size="large" class="button-primary" @click="handleSubmit" style="padding: 0 60px;">提交</a-button>
+        <a-button
+          type="primary"
+          id="purchaseOrderEdit-submit-btn"
+          size="large"
+          class="button-primary"
+          @click="handleSubmit"
+          style="padding: 0 60px;">提交</a-button>
       </div>
     </a-affix>
     <!-- 选择基本信息弹框 -->

+ 33 - 39
src/views/purchasingManagement/purchaseOrder/list.vue

@@ -23,37 +23,37 @@
           <a-col :md="6" :sm="24">
             <a-form-item label="供应商" :label-col="{ span:7 }" :wrapper-col="{ span:17}">
               <a-select
-                id="purchaseOrderList-dealerName"
+                id="purchaseOrderList-supplierSn"
                 placeholder="请选择供应商"
                 allowClear
-                v-model="queryParam.dealerName"
+                v-model="queryParam.supplierSn"
                 :showSearch="true"
                 option-filter-prop="children"
                 :filter-option="filterOption">
-                <a-select-option v-for="item in customeList" :key="item.salesChannelNo" :value="item.salesChannelNo">{{ item.salesChannelName }}</a-select-option>
+                <a-select-option v-for="item in supplierList" :key="item.supplierSn" :value="item.supplierSn">{{ item.supplierName }}</a-select-option>
               </a-select>
             </a-form-item>
           </a-col>
           <template v-if="advanced">
             <a-col :md="6" :sm="24">
-              <a-form-item label="单据状态">
+              <a-form-item label="业务状态">
                 <v-select
-                  v-model="queryParam.auditStatus"
-                  ref="auditStatus"
-                  id="purchaseOrderList-auditStatus"
-                  code="PAYMENT_TYPE"
-                  placeholder="请选择单据状态"
+                  v-model="queryParam.billStatus"
+                  ref="billStatus"
+                  id="purchaseOrderList-billStatus"
+                  code="SALES_BILL_STATUS"
+                  placeholder="请选择业务状态"
                   allowClear></v-select>
               </a-form-item>
             </a-col>
             <a-col :md="6" :sm="24">
-              <a-form-item label="结算状态">
+              <a-form-item label="财务状态">
                 <v-select
                   v-model="queryParam.financialStatus"
                   ref="financialStatus"
                   id="purchaseOrderList-financialStatus"
-                  code="PAYMENT_TYPE"
-                  placeholder="请选择结算状态"
+                  code="FINANCIAL_STATUS"
+                  placeholder="请选择财务状态"
                   allowClear></v-select>
               </a-form-item>
             </a-col>
@@ -93,43 +93,33 @@
       <template slot="purchaseBillNo" slot-scope="text, record">
         <span style="color: #ed1c24;cursor: pointer;" @click="handleDetail(record)">{{ record.purchaseBillNo }}</span>
       </template>
-      <!-- 业务/审核状态 -->
-      <template slot="auditStatus" slot-scope="text, record">
-        <a-tag :color="record.state=='FINISH'?'green':'red'" >{{ record.state=='FINISH'? '待备货审核': '待单据审核' }}</a-tag>
-      </template>
       <!-- 财务状态 -->
       <template slot="financialStatus" slot-scope="text, record">
-        <a-tag :color="record.state==1?'green':'red'" >{{ record.state==1? '待提交': '待单据审核' }}</a-tag>
+        <a-badge :color="text=='FINISH'?'#87d068':'gold'" :text="record.financialStatusDictValue" />
       </template>
       <!-- 操作 -->
       <template slot="action" slot-scope="text, record">
         <a-button
           size="small"
-          type="primary"
+          type="link"
           class="button-info"
           @click="handleEdit(record)"
           id="purchasingManagement-edit-btn">编辑</a-button>
         <a-button
           size="small"
-          type="primary"
+          type="link"
           class="button-success"
           @click="handleDetail(record)"
           id="purchasingManagement-detail-btn">详情</a-button>
         <a-button
           size="small"
-          type="primary"
-          class="button-primary"
-          @click="handleSubmit(record)"
-          id="purchasingManagement-submit-btn">提交</a-button>
-        <a-button
-          size="small"
-          type="primary"
+          type="link"
           class="button-warning"
           @click="handleWarehouse(record)"
           id="purchasingManagement-warehouse-btn">签收入库</a-button>
         <a-button
           size="small"
-          type="primary"
+          type="link"
           class="button-error"
           @click="handleDel(record)"
           id="purchasingManagement-del-btn">删除</a-button>
@@ -144,6 +134,7 @@
 import { STable, VSelect } from '@/components'
 import basicInfoModal from './basicInfoModal.vue'
 import { purchaseList } from '@/api/purchase'
+import { supplierAllList } from '@/api/supplier'
 export default {
   components: { STable, VSelect, basicInfoModal },
   data () {
@@ -151,7 +142,7 @@ export default {
       advanced: false, //  高级搜索 展开/关闭
       disabled: false, //  查询、重置按钮是否可操作
       openModal: false, // 基本信息弹框是否显示
-      customeList: [],
+      supplierList: [],
       dateFormat: 'YYYY-MM-DD',
       time: [], //  创建时间
       // 查询参数
@@ -165,8 +156,8 @@ export default {
         { title: '产品款数', dataIndex: 'totalCategory', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '采购数量', dataIndex: 'totalQty', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '采购金额(¥)', dataIndex: 'totalAmount', width: 115, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '业务状态', scopedSlots: { customRender: 'auditStatus' }, width: 100, align: 'center' },
-        { title: '财务状态', scopedSlots: { customRender: 'financialStatus' }, width: 100, align: 'center' },
+        { title: '业务状态', dataIndex: 'billStatusDictValue', width: 110, align: 'center' },
+        { title: '财务状态', dataIndex: 'financialStatus', scopedSlots: { customRender: 'financialStatus' }, width: 100, align: 'center' },
         { title: '操作', scopedSlots: { customRender: 'action' }, width: 350, align: 'center', fixed: 'right' }
       ],
       // 加载数据方法 必须为 Promise 对象
@@ -194,24 +185,20 @@ export default {
       this.openModal = true
     },
     //  基本信息  保存
-    handleOk () {
-      this.$router.push({ path: `/purchasingManagement/purchaseOrder/add` })
+    handleOk (row) {
+      this.$router.push({ name: `purchaseOrderAdd`, params: { id: row.id } })
     },
     //  编辑
     handleEdit (row) {
-      this.$router.push({ path: `/purchasingManagement/purchaseOrder/edit/${row.id}` })
+      this.$router.push({ name: `purchaseOrderEdit`, params: { id: row.id } })
     },
     //  详情
     handleDetail (row) {
-      this.$router.push({ path: `/purchasingManagement/purchaseOrder/detail/${row.id}` })
-    },
-    //  提交
-    handleSubmit () {
-
+      this.$router.push({ name: `purchaseOrderDetail`, params: { id: row.id } })
     },
     //  签收入库
     handleWarehouse (row) {
-      this.$router.push({ path: `/purchasingManagement/purchaseOrder/warehousing/${row.id}` })
+      this.$router.push({ name: `purchaseOrderWarehousing`, params: { id: row.id } })
     },
     //  删除
     handleDel (row) {
@@ -247,11 +234,18 @@ export default {
     	return (
     		option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
     	)
+    },
+    // 获取供应商数据
+    getSupperList () {
+      supplierAllList().then(res => {
+        this.supplierList = res.data || []
+      })
     }
   },
   beforeRouteEnter (to, from, next) {
     next(vm => {
       vm.openModal = false
+      vm.getSupperList()
     })
   }
 }

+ 2 - 2
src/views/purchasingManagement/purchaseOrder/receivingAddress/chooseAddressModal.vue

@@ -6,7 +6,7 @@
     :maskClosable="false"
     title="收货地址"
     v-model="isShow"
-    @cancle="isShow=false"
+    @cancel="isShow=false"
     width="70%">
     <!-- 操作按钮 -->
     <div class="table-operator">
@@ -147,7 +147,7 @@ export default {
     },
     //  选择
     handleChoose (row) {
-
+      this.$emit('ok', row)
     },
     //  删除
     handleDel (row) {