|
@@ -84,6 +84,18 @@
|
|
|
</template>
|
|
|
</s-table>
|
|
|
</div>
|
|
|
+
|
|
|
+ <!-- 查看销售单或备货单详情 -->
|
|
|
+ <commonModal
|
|
|
+ :modalTit="detailType?'备货单详情':'销售单详情'"
|
|
|
+ bodyPadding="10px"
|
|
|
+ width="70%"
|
|
|
+ :showFooter="false"
|
|
|
+ :openModal="showDetailModal"
|
|
|
+ @cancel="cancelDetail">
|
|
|
+ <salesDetail v-if="detailType==0" ref="salesDetail" :bizSn="bizSn"></salesDetail>
|
|
|
+ <dispatchDetail v-if="detailType==1" ref="dispatchDetail" :bizSn="bizSn"></dispatchDetail>
|
|
|
+ </commonModal>
|
|
|
</a-spin>
|
|
|
</a-modal>
|
|
|
</template>
|
|
@@ -91,10 +103,13 @@
|
|
|
<script>
|
|
|
import { STable, VSelect } from '@/components'
|
|
|
import { dispatchlList } from '@/api/dispatch'
|
|
|
+import commonModal from '@/views/common/commonModal.vue'
|
|
|
+import salesDetail from '@/views/salesManagement/salesQuery/detail.vue'
|
|
|
+import dispatchDetail from '@/views/salesManagement/pushOrderManagement/detail.vue'
|
|
|
import dealerSubareaScopeList from '@/views/common/dealerSubareaScopeList.vue'
|
|
|
export default {
|
|
|
name: 'SelectGlSalesModal',
|
|
|
- components: { STable, VSelect, dealerSubareaScopeList },
|
|
|
+ components: { STable, VSelect, dealerSubareaScopeList, commonModal, salesDetail, dispatchDetail },
|
|
|
props: {
|
|
|
openModal: { // 弹框显示状态
|
|
|
type: Boolean,
|
|
@@ -124,7 +139,9 @@ export default {
|
|
|
isShow: this.openModal, // 是否打开弹框
|
|
|
disabled: false,
|
|
|
spinning: false,
|
|
|
- handlePlData: [],
|
|
|
+ showDetailModal: false,
|
|
|
+ detailType: 2,
|
|
|
+ bizSn: null,
|
|
|
queryParam: {
|
|
|
buyerSn: undefined, // 客户名称
|
|
|
receiverSn: undefined, // 收货客户
|
|
@@ -185,6 +202,17 @@ export default {
|
|
|
shcustChange (val) {
|
|
|
this.queryParam.receiverSn = val.key
|
|
|
},
|
|
|
+ handleDetail (row, type) {
|
|
|
+ this.detailType = type
|
|
|
+ this.bizSn = type == 0 ? row.salesBillSn : row.dispatchBillSn
|
|
|
+ this.showDetailModal = true
|
|
|
+ console.log(this.bizSn)
|
|
|
+ },
|
|
|
+ cancelDetail () {
|
|
|
+ this.showDetailModal = false
|
|
|
+ this.detailType = 2
|
|
|
+ this.bizSn = null
|
|
|
+ },
|
|
|
// 删除
|
|
|
handleDel (row) {
|
|
|
const oi = this.orginData.findIndex(item => row.bizSn == item.dispatchBillSn)
|
|
@@ -219,7 +247,9 @@ export default {
|
|
|
this.$refs.shbuyerName.resetForm()
|
|
|
})
|
|
|
if (this.$refs.table && !flag) {
|
|
|
- this.$refs.table.refresh(true)
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.$refs.table.refresh(true)
|
|
|
+ })
|
|
|
}
|
|
|
}
|
|
|
},
|
|
@@ -236,8 +266,8 @@ export default {
|
|
|
if (!newValue) {
|
|
|
this.handleCommonCancel()
|
|
|
} else {
|
|
|
+ this.resetSearchForm(1)
|
|
|
if (this.dealerSn) {
|
|
|
- this.resetSearchForm(1)
|
|
|
// 回显客户
|
|
|
this.queryParam.buyerSn = this.dealerSn
|
|
|
this.$nextTick(() => {
|
|
@@ -245,7 +275,9 @@ export default {
|
|
|
this.$refs.table.refresh(true)
|
|
|
})
|
|
|
} else {
|
|
|
- this.resetSearchForm()
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.$refs.table.refresh(true)
|
|
|
+ })
|
|
|
}
|
|
|
}
|
|
|
}
|