|
@@ -5,7 +5,7 @@
|
|
<template slot="subTitle">
|
|
<template slot="subTitle">
|
|
<a id="purchaseNewOrderEdit-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
|
|
<a id="purchaseNewOrderEdit-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
|
|
<p class="billno">单号:{{ detail&&detail.purchaseBillNo }}</p>
|
|
<p class="billno">单号:{{ detail&&detail.purchaseBillNo }}</p>
|
|
- <a-button type="primary" ghost @click="isShowBisiceInfo=!isShowBisiceInfo" style="margin-left:30px;vertical-align:middle;">
|
|
|
|
|
|
+ <a-button type="danger" ghost @click="isShowBisiceInfo=!isShowBisiceInfo" style="margin-left:30px;vertical-align:middle;">
|
|
基础信息
|
|
基础信息
|
|
<a-icon :type="isShowBisiceInfo ? 'up' : 'down'"/>
|
|
<a-icon :type="isShowBisiceInfo ? 'up' : 'down'"/>
|
|
</a-button>
|
|
</a-button>
|
|
@@ -61,10 +61,10 @@
|
|
<p class="tag-txt">注意:仅限采购【箭冠】产品。自建产品的采购入库请使用“散件入库”功能</p>
|
|
<p class="tag-txt">注意:仅限采购【箭冠】产品。自建产品的采购入库请使用“散件入库”功能</p>
|
|
</div>
|
|
</div>
|
|
<div class="actions-button">
|
|
<div class="actions-button">
|
|
- <a-button v-if="detail&&detail.totalCategory" id="purchaseNewOrderEdit-add-btn" type="primary" ghost @click="openChooseProduct=true">添加产品</a-button>
|
|
|
|
- <a-button id="purchaseNewOrderEdit-import-btn" type="primary" ghost @click="openGuideModal=true">产品导入</a-button>
|
|
|
|
- <a-button id="purchaseNewOrderEdit-outStock-btn" type="primary" ghost @click="handleOutStock">上次缺货</a-button>
|
|
|
|
- <a-button id="purchaseNewOrderEdit-cart-btn" type="primary" ghost>购物车</a-button>
|
|
|
|
|
|
+ <a-button v-if="detail&&detail.totalCategory" id="purchaseNewOrderEdit-add-btn" type="danger" @click="openChooseProduct=true"><a-icon type="plus-circle" />添加产品</a-button>
|
|
|
|
+ <a-button id="purchaseNewOrderEdit-import-btn" type="danger" ghost @click="openGuideModal=true"><a-icon type="import" />产品导入</a-button>
|
|
|
|
+ <a-button id="purchaseNewOrderEdit-outStock-btn" type="danger" ghost @click="handleOutStock"><a-icon type="funnel-plot" />上次缺货</a-button>
|
|
|
|
+ <a-button id="purchaseNewOrderEdit-cart-btn" type="danger" ghost><a-icon type="shopping" />购物车</a-button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="choosed-table" v-if="detail&&detail.totalCategory">
|
|
<div class="choosed-table" v-if="detail&&detail.totalCategory">
|
|
@@ -133,7 +133,7 @@
|
|
</s-table>
|
|
</s-table>
|
|
</div>
|
|
</div>
|
|
<div v-else>
|
|
<div v-else>
|
|
- <div v-if="!spinning">
|
|
|
|
|
|
+ <div v-if="!spinning&&localDataSource.length==0">
|
|
<a-empty
|
|
<a-empty
|
|
:image="simpleImage"
|
|
:image="simpleImage"
|
|
:image-style="{
|
|
:image-style="{
|
|
@@ -144,7 +144,7 @@
|
|
<a-button type="primary" class="button-error" @click="openChooseProduct=true"><a-icon type="plus-circle" />立即添加产品</a-button>
|
|
<a-button type="primary" class="button-error" @click="openChooseProduct=true"><a-icon type="plus-circle" />立即添加产品</a-button>
|
|
</a-empty>
|
|
</a-empty>
|
|
</div>
|
|
</div>
|
|
- <div style="text-align: center;padding: 30px 50px;" v-else>
|
|
|
|
|
|
+ <div style="text-align: center;padding: 30px 50px;" v-if="spinning">
|
|
<a-spin :spinning="spinning" tip="Loading..."></a-spin>
|
|
<a-spin :spinning="spinning" tip="Loading..."></a-spin>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@@ -220,6 +220,7 @@ export default {
|
|
// 加载数据方法 必须为 Promise 对象
|
|
// 加载数据方法 必须为 Promise 对象
|
|
chooseLoadData: parameter => {
|
|
chooseLoadData: parameter => {
|
|
this.disabled = true
|
|
this.disabled = true
|
|
|
|
+ this.spinning = true
|
|
// 查询总计
|
|
// 查询总计
|
|
const params = Object.assign({ pageNo: 1, pageSize: 5000 }, this.productForm, { purchaseBillSn: this.$route.params.sn })
|
|
const params = Object.assign({ pageNo: 1, pageSize: 5000 }, this.productForm, { purchaseBillSn: this.$route.params.sn })
|
|
return purchaseDetailList(params).then(res => {
|
|
return purchaseDetailList(params).then(res => {
|
|
@@ -251,14 +252,14 @@ export default {
|
|
const arr = [
|
|
const arr = [
|
|
{ title: '序号', dataIndex: 'no', width: '5%', align: 'center' },
|
|
{ title: '序号', dataIndex: 'no', width: '5%', align: 'center' },
|
|
{ title: '产品编码', dataIndex: 'dealerProductEntity.code', width: '20%', align: 'center' },
|
|
{ title: '产品编码', dataIndex: 'dealerProductEntity.code', width: '20%', align: 'center' },
|
|
- { title: '产品名称', dataIndex: 'dealerProductEntity.name', width: '30%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
|
- { title: '采购数量', scopedSlots: { customRender: 'storageQuantity' }, width: '10%', align: 'center' },
|
|
|
|
|
|
+ { title: '产品名称', dataIndex: 'dealerProductEntity.name', width: '35%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
|
+ { title: '采购数量', scopedSlots: { customRender: 'storageQuantity' }, width: '8%', align: 'center' },
|
|
{ title: '单位', dataIndex: 'dealerProductEntity.unit', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
{ title: '单位', dataIndex: 'dealerProductEntity.unit', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
{ title: '操作', scopedSlots: { customRender: 'action' }, width: '8%', align: 'center' }
|
|
{ title: '操作', scopedSlots: { customRender: 'action' }, width: '8%', align: 'center' }
|
|
]
|
|
]
|
|
if (this.$hasPermissions('M_ShowAllCost')) {
|
|
if (this.$hasPermissions('M_ShowAllCost')) {
|
|
- arr.splice(3, 0, { title: '采购单价', dataIndex: 'discountedPrice', width: '20%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text, 2) : '--') } })
|
|
|
|
- arr.splice(6, 0, { title: '采购金额', dataIndex: 'discountedAmount', width: '9%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text, 2) : '--') } })
|
|
|
|
|
|
+ arr.splice(3, 0, { title: '采购单价', dataIndex: 'discountedPrice', width: '8%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text, 2) : '--') } })
|
|
|
|
+ arr.splice(6, 0, { title: '采购金额', dataIndex: 'discountedAmount', width: '8%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text, 2) : '--') } })
|
|
}
|
|
}
|
|
return arr
|
|
return arr
|
|
}
|
|
}
|
|
@@ -271,10 +272,15 @@ export default {
|
|
if (res.status == 200) {
|
|
if (res.status == 200) {
|
|
this.detail = res.data
|
|
this.detail = res.data
|
|
if (!noRefashTable) {
|
|
if (!noRefashTable) {
|
|
- if (isReset) {
|
|
|
|
- this.resetPurchaseForm()
|
|
|
|
- } else {
|
|
|
|
- this.$refs.purchaseTable.refresh(!!flag)
|
|
|
|
|
|
+ if(this.detail.totalCategory){
|
|
|
|
+ if (isReset) {
|
|
|
|
+ this.resetPurchaseForm()
|
|
|
|
+ } else {
|
|
|
|
+ this.$refs.purchaseTable.refresh(!!flag)
|
|
|
|
+ }
|
|
|
|
+ }else{
|
|
|
|
+ this.localDataSource = []
|
|
|
|
+ this.spinning = false
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
this.spinning = false
|
|
this.spinning = false
|
|
@@ -416,7 +422,11 @@ export default {
|
|
// 打印预览/快捷打印
|
|
// 打印预览/快捷打印
|
|
handlePrint (type, printerType) {
|
|
handlePrint (type, printerType) {
|
|
const _this = this
|
|
const _this = this
|
|
- _this.spinning = true
|
|
|
|
|
|
+ if(type == 'preview'){
|
|
|
|
+ _this.openChooseProduct = false
|
|
|
|
+ _this.openOutStockModal = false
|
|
|
|
+ }
|
|
|
|
+ _this.$store.state.app.printLoading = true
|
|
let url = purchaseDetailPrint
|
|
let url = purchaseDetailPrint
|
|
let params = { sn: this.$route.params.sn, type: printerType }
|
|
let params = { sn: this.$route.params.sn, type: printerType }
|
|
if (type == 'export') { // 导出
|
|
if (type == 'export') { // 导出
|
|
@@ -425,7 +435,7 @@ export default {
|
|
}
|
|
}
|
|
// 打印或导出
|
|
// 打印或导出
|
|
hdPrint(printerType, type, url, params, '采购单', function () {
|
|
hdPrint(printerType, type, url, params, '采购单', function () {
|
|
- _this.spinning = false
|
|
|
|
|
|
+ _this.$store.state.app.printLoading = false
|
|
})
|
|
})
|
|
},
|
|
},
|
|
// 返回列表
|
|
// 返回列表
|
|
@@ -528,6 +538,9 @@ export default {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ .ant-input-number-sm input{
|
|
|
|
+ text-align: center;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
.purchaseNewOrderEdit-cont{
|
|
.purchaseNewOrderEdit-cont{
|
|
margin-bottom: 8px;
|
|
margin-bottom: 8px;
|