lilei 4 lat temu
rodzic
commit
2880f809d0

+ 6 - 0
src/views/purchasingManagement/purchaseOrder/basicInfoModal.vue

@@ -146,6 +146,12 @@ export default {
       this.form.consigneeName = data.consigneeName
       this.form.consigneeName = data.consigneeName
       this.openAddrModal = false
       this.openAddrModal = false
     },
     },
+    // 编辑信息
+    setData (data) {
+      this.form = data
+      this.chooseAddr = data.consigneeName + '(' + data.consigneeTel + ')' + ' ' + data.address
+      this.addressVal = '更换地址'
+    },
     // 获取收款方式
     // 获取收款方式
     getSettleStyle () {
     getSettleStyle () {
       settleStyleQueryAll().then(res => {
       settleStyleQueryAll().then(res => {

+ 32 - 13
src/views/purchasingManagement/purchaseOrder/edit.vue

@@ -4,7 +4,7 @@
       <!-- 自定义的二级文字标题 -->
       <!-- 自定义的二级文字标题 -->
       <template slot="subTitle">
       <template slot="subTitle">
         <a id="purchaseOrderEdit-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
         <a id="purchaseOrderEdit-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
-        <p class="billno">单号:CG2021010100001</p>
+        <p class="billno">单号:{{ detail&&detail.purchaseBillNo }}</p>
       </template>
       </template>
       <!-- 操作区,位于 title 行的行尾 -->
       <!-- 操作区,位于 title 行的行尾 -->
       <template slot="extra">
       <template slot="extra">
@@ -28,10 +28,15 @@
               @click.stop="handleEditInfo" />
               @click.stop="handleEditInfo" />
           </template>
           </template>
           <a-descriptions :column="3">
           <a-descriptions :column="3">
-            <a-descriptions-item label="供应商">箭冠营销中心</a-descriptions-item>
-            <a-descriptions-item label="支付方式">箭冠营销中心</a-descriptions-item>
-            <a-descriptions-item label="收货人">箭冠营销中心</a-descriptions-item>
-            <a-descriptions-item label="收货地址">箭冠营销中心</a-descriptions-item>
+            <a-descriptions-item label="供应商">{{ detail&&detail.dealerName }}</a-descriptions-item>
+            <a-descriptions-item label="支付方式">{{ detail&&detail.settleStyle }}</a-descriptions-item>
+            <a-descriptions-item label="收货人">{{ detail&&detail.consigneeName }}({{ detail&&detail.consigneeTel }})</a-descriptions-item>
+            <a-descriptions-item label="收货地址">
+              {{ detail&&detail.shippingAddressProvinceName }} -
+              {{ detail&&detail.shippingAddressCityName }} -
+              {{ detail&&detail.shippingAddressCountyName }} -
+              {{ detail&&detail.shippingAddress }}
+            </a-descriptions-item>
           </a-descriptions>
           </a-descriptions>
         </a-collapse-panel>
         </a-collapse-panel>
       </a-collapse>
       </a-collapse>
@@ -176,19 +181,22 @@
       </div>
       </div>
     </a-affix>
     </a-affix>
     <!-- 选择基本信息弹框 -->
     <!-- 选择基本信息弹框 -->
-    <basic-info-modal :openModal="openModal" @ok="handleOk" @close="openModal=false" />
+    <basic-info-modal ref="baseInfo" :openModal="openModal" @ok="handleOk" @close="openModal=false" />
   </div>
   </div>
 </template>
 </template>
 
 
 <script>
 <script>
 import { STable, VSelect } from '@/components'
 import { STable, VSelect } from '@/components'
 import basicInfoModal from './basicInfoModal.vue'
 import basicInfoModal from './basicInfoModal.vue'
+import { purchaseDetail } from '@/api/purchase'
 export default {
 export default {
   components: { STable, VSelect, basicInfoModal },
   components: { STable, VSelect, basicInfoModal },
   data () {
   data () {
     return {
     return {
+      openModal: false, // 选择基本信息弹框是否显示
+      detail: null, // 详细信息
+      // 选择产品
       queryParam: {
       queryParam: {
-
       },
       },
       brandData: [], //  产品品牌  下拉数据
       brandData: [], //  产品品牌  下拉数据
       typeData: [], //  产品类别  下拉数据
       typeData: [], //  产品类别  下拉数据
@@ -238,6 +246,7 @@ export default {
           resolve(data)
           resolve(data)
         })
         })
       },
       },
+      // 已选产品
       // 表头
       // 表头
       chooseColumns: [
       chooseColumns: [
         { title: '序号', dataIndex: 'no', width: 80, align: 'center' },
         { title: '序号', dataIndex: 'no', width: 80, align: 'center' },
@@ -278,11 +287,24 @@ export default {
           _this.disabled = false
           _this.disabled = false
           resolve(data)
           resolve(data)
         })
         })
-      },
-      openModal: false // 选择基本信息弹框是否显示
+      }
+
     }
     }
   },
   },
   methods: {
   methods: {
+    // 获取采购单详情
+    getOrderDetail () {
+      purchaseDetail({ id: this.$route.params.id }).then(res => {
+        if (res.status == 200) {
+          this.detail = res.data
+        }
+        this.$message.info(res.message)
+      })
+    },
+    //  基本信息编辑成功
+    handleOk (data) {
+      this.getOrderDetail()
+    },
     //  重置
     //  重置
     resetSearchForm () {
     resetSearchForm () {
       this.queryParam.orderBundleNo = ''
       this.queryParam.orderBundleNo = ''
@@ -300,14 +322,11 @@ export default {
     //  编辑基本信息
     //  编辑基本信息
     handleEditInfo () {
     handleEditInfo () {
       this.openModal = true
       this.openModal = true
+      this.$refs.baseInfo.setData(this.detail)
     },
     },
     //  提交
     //  提交
     handleSubmit () {
     handleSubmit () {
 
 
-    },
-    //  基本信息  保存
-    handleOk () {
-
     },
     },
     //  返回列表
     //  返回列表
     handleBack () {
     handleBack () {