|
@@ -123,16 +123,15 @@
|
|
</a-form>
|
|
</a-form>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div>
|
|
- <span v-if="selectedDealer">(发货经销商:{{ selectedDealer }})</span>
|
|
|
|
|
|
+ <span v-if="selectedDealer">发货经销商:{{ selectedDealer }}</span>
|
|
<a-button
|
|
<a-button
|
|
id="salesDetail-updateStock"
|
|
id="salesDetail-updateStock"
|
|
type="link"
|
|
type="link"
|
|
v-if="showTransferDealer"
|
|
v-if="showTransferDealer"
|
|
- style="margin:0 10px;"
|
|
|
|
@click="openDealerModal"
|
|
@click="openDealerModal"
|
|
class="button-dealerStock">选择发货经销商</a-button>
|
|
class="button-dealerStock">选择发货经销商</a-button>
|
|
- <a-button id="salesDetail-updateStock" type="primary" v-if="showStock" @click="getThreeStock" class="button-info">第三方库存</a-button>
|
|
|
|
<a-button id="salesDetail-stockOut" v-if="detailData && (detailData.billStatus == 'WAIT_AUDIT' || detailData.billStatus == 'HQ_CHANGE')" type="link" @click="openStockOut">缺货明细</a-button>
|
|
<a-button id="salesDetail-stockOut" v-if="detailData && (detailData.billStatus == 'WAIT_AUDIT' || detailData.billStatus == 'HQ_CHANGE')" type="link" @click="openStockOut">缺货明细</a-button>
|
|
|
|
+ <a-checkbox id="salesDetail-updateStock" @change="e=>getThreeStock(e)" v-if="showStock"><span style="display: inline-block;margin-top: 1px;">第三方库存</span></a-checkbox>
|
|
<a-checkbox id="salesDetail-cityPrice" v-model="isCityPrice" v-if="$hasPermissions(authCode + '_cityPrice')"><span style="display: inline-block;margin-top: 1px;">市级价</span></a-checkbox>
|
|
<a-checkbox id="salesDetail-cityPrice" v-model="isCityPrice" v-if="$hasPermissions(authCode + '_cityPrice')"><span style="display: inline-block;margin-top: 1px;">市级价</span></a-checkbox>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@@ -224,9 +223,8 @@
|
|
转单
|
|
转单
|
|
</a-button>
|
|
</a-button>
|
|
<a-button
|
|
<a-button
|
|
- type="primary"
|
|
|
|
|
|
+ type="default"
|
|
class="button-info"
|
|
class="button-info"
|
|
- ghost
|
|
|
|
:disabled="spinning"
|
|
:disabled="spinning"
|
|
style="width: 100px;margin: 0 10px;"
|
|
style="width: 100px;margin: 0 10px;"
|
|
id="salesDetail-edit-btn"
|
|
id="salesDetail-edit-btn"
|
|
@@ -238,8 +236,7 @@
|
|
<a-button
|
|
<a-button
|
|
style="width: 100px;margin: 0 10px;"
|
|
style="width: 100px;margin: 0 10px;"
|
|
:disabled="spinning"
|
|
:disabled="spinning"
|
|
- type="primary"
|
|
|
|
- ghost
|
|
|
|
|
|
+ type="default"
|
|
id="salesDetail-edit1-btn"
|
|
id="salesDetail-edit1-btn"
|
|
v-if="detailData&&detailData.salesBillSource == 'PURCHASE' && (detailData.billStatus == 'WAIT_AUDIT'||detailData.billStatus == 'HQ_CHANGE'||detailData.billStatus == 'SUPERIOR_AUDIT_REJECT' || detailData.billStatus == 'TRANSFER_AUDIT_REJECT')&&$hasPermissions('B_salesEdit')"
|
|
v-if="detailData&&detailData.salesBillSource == 'PURCHASE' && (detailData.billStatus == 'WAIT_AUDIT'||detailData.billStatus == 'HQ_CHANGE'||detailData.billStatus == 'SUPERIOR_AUDIT_REJECT' || detailData.billStatus == 'TRANSFER_AUDIT_REJECT')&&$hasPermissions('B_salesEdit')"
|
|
@click="handleChangeOrder()"
|
|
@click="handleChangeOrder()"
|
|
@@ -251,7 +248,6 @@
|
|
:disabled="spinning"
|
|
:disabled="spinning"
|
|
type="primary"
|
|
type="primary"
|
|
class="button-info"
|
|
class="button-info"
|
|
- ghost
|
|
|
|
id="salesDetail-UPaudit-btn"
|
|
id="salesDetail-UPaudit-btn"
|
|
v-if="detailData&&(detailData.billStatus == 'WAIT_AUDIT'||detailData.billStatus == 'SUPERIOR_AUDIT_REJECT' || detailData.billStatus == 'TRANSFER_AUDIT_REJECT')&&$hasPermissions('B_salesAudit')&&$route.params.pageType!='salesNewDetailTransfer'"
|
|
v-if="detailData&&(detailData.billStatus == 'WAIT_AUDIT'||detailData.billStatus == 'SUPERIOR_AUDIT_REJECT' || detailData.billStatus == 'TRANSFER_AUDIT_REJECT')&&$hasPermissions('B_salesAudit')&&$route.params.pageType!='salesNewDetailTransfer'"
|
|
@click="handleAudit()"
|
|
@click="handleAudit()"
|
|
@@ -429,7 +425,7 @@ export default {
|
|
showConvertPromoGifts () {
|
|
showConvertPromoGifts () {
|
|
return this.activeList && this.activeList.filter(item => item.enabledFlag == 1).find(item => item.promotionRule && item.promotionRule.convertExpenseFlag == 1 && item.promotionRule.promotionRuleType == 'BUY_PROD_GIVE_PROD')
|
|
return this.activeList && this.activeList.filter(item => item.enabledFlag == 1).find(item => item.promotionRule && item.promotionRule.convertExpenseFlag == 1 && item.promotionRule.promotionRuleType == 'BUY_PROD_GIVE_PROD')
|
|
},
|
|
},
|
|
- // 是否显示库存列
|
|
|
|
|
|
+ // 是否显示三方库存列
|
|
showStock () {
|
|
showStock () {
|
|
return this.detailData && (this.detailData.billStatus == 'WAIT_AUDIT' || this.detailData.billStatus == 'HQ_CHANGE') && this.$hasPermissions('B_salesAudit')
|
|
return this.detailData && (this.detailData.billStatus == 'WAIT_AUDIT' || this.detailData.billStatus == 'HQ_CHANGE') && this.$hasPermissions('B_salesAudit')
|
|
},
|
|
},
|
|
@@ -525,8 +521,10 @@ export default {
|
|
this.$router.push({ name: 'salesNewEdit', params: { sn: this.$route.params.sn || this.bizSn } })
|
|
this.$router.push({ name: 'salesNewEdit', params: { sn: this.$route.params.sn || this.bizSn } })
|
|
},
|
|
},
|
|
// 查询第三方库存
|
|
// 查询第三方库存
|
|
- getThreeStock () {
|
|
|
|
- this.$refs.productList.showThreeStock()
|
|
|
|
|
|
+ getThreeStock (e) {
|
|
|
|
+ this.hideActiveTable = this.activeList.length == 0
|
|
|
|
+ this.$refs.productList.showThreeStock(e.target.checked)
|
|
|
|
+ if (!this.hideActiveTable) this.$refs.productActiveList.showThreeStock(e.target.checked)
|
|
},
|
|
},
|
|
// 重置
|
|
// 重置
|
|
resetSearchForm () {
|
|
resetSearchForm () {
|
|
@@ -570,11 +568,11 @@ export default {
|
|
this.spinning = false
|
|
this.spinning = false
|
|
setTimeout(() => {
|
|
setTimeout(() => {
|
|
this.resetSearchForm()
|
|
this.resetSearchForm()
|
|
- }, 500)
|
|
|
|
|
|
+ }, 300)
|
|
},
|
|
},
|
|
// 打开缺货明细弹框
|
|
// 打开缺货明细弹框
|
|
openStockOut () {
|
|
openStockOut () {
|
|
- if (this.$refs.productList.outStockStr != '') {
|
|
|
|
|
|
+ if (this.$refs.productList.outStockStr != '' || this.activeList.length && this.$refs.productActiveList.outStockStr != '') {
|
|
this.showStockOut = true
|
|
this.showStockOut = true
|
|
} else {
|
|
} else {
|
|
this.$info({
|
|
this.$info({
|
|
@@ -589,13 +587,16 @@ export default {
|
|
this.$emit('close')
|
|
this.$emit('close')
|
|
this.$router.push({ name: 'waitDispatchNew', params: { salesBillSn: row.salesBillSn } })
|
|
this.$router.push({ name: 'waitDispatchNew', params: { salesBillSn: row.salesBillSn } })
|
|
},
|
|
},
|
|
- // 验证转单
|
|
|
|
|
|
+ // 转单
|
|
handleOrder () {
|
|
handleOrder () {
|
|
const _this = this
|
|
const _this = this
|
|
if (!_this.selectedDealerSn) {
|
|
if (!_this.selectedDealerSn) {
|
|
_this.$message.warning('请选择发货经销商!')
|
|
_this.$message.warning('请选择发货经销商!')
|
|
|
|
+ _this.openDealerModal()
|
|
return
|
|
return
|
|
}
|
|
}
|
|
|
|
+ _this.spinning = true
|
|
|
|
+ // 验证
|
|
transferVerify({ salesBillSn: _this.$route.params.sn, transferDealerSn: _this.selectedDealerSn }).then(res => {
|
|
transferVerify({ salesBillSn: _this.$route.params.sn, transferDealerSn: _this.selectedDealerSn }).then(res => {
|
|
if (res.status == 200) {
|
|
if (res.status == 200) {
|
|
if (res.data && Object.keys(res.data).length) {
|
|
if (res.data && Object.keys(res.data).length) {
|
|
@@ -606,9 +607,12 @@ export default {
|
|
closable: true,
|
|
closable: true,
|
|
okText: '提交',
|
|
okText: '提交',
|
|
onOk () {
|
|
onOk () {
|
|
- _this.spinning = true
|
|
|
|
|
|
+ _this.spinning = false
|
|
// 验证成功
|
|
// 验证成功
|
|
_this.handleTransfer()
|
|
_this.handleTransfer()
|
|
|
|
+ },
|
|
|
|
+ onCancel () {
|
|
|
|
+ _this.spinning = false
|
|
}
|
|
}
|
|
})
|
|
})
|
|
} else {
|
|
} else {
|
|
@@ -617,22 +621,23 @@ export default {
|
|
}
|
|
}
|
|
})
|
|
})
|
|
},
|
|
},
|
|
- // 转单
|
|
|
|
|
|
+ // 提交转单
|
|
handleTransfer () {
|
|
handleTransfer () {
|
|
|
|
+ this.spinning = true
|
|
transfer({ salesBillSn: this.$route.params.sn, transferDealerSn: this.selectedDealerSn }).then(res => {
|
|
transfer({ salesBillSn: this.$route.params.sn, transferDealerSn: this.selectedDealerSn }).then(res => {
|
|
if (res.status == 200) {
|
|
if (res.status == 200) {
|
|
- this.spinning = false
|
|
|
|
this.$message.success(res.message)
|
|
this.$message.success(res.message)
|
|
// 转单成功 关闭详情跳列表
|
|
// 转单成功 关闭详情跳列表
|
|
this.handleBack()
|
|
this.handleBack()
|
|
}
|
|
}
|
|
|
|
+ this.spinning = false
|
|
})
|
|
})
|
|
},
|
|
},
|
|
// 打开 转单审核弹窗
|
|
// 打开 转单审核弹窗
|
|
handleTransferAudit () {
|
|
handleTransferAudit () {
|
|
this.openTransferOrder = true
|
|
this.openTransferOrder = true
|
|
},
|
|
},
|
|
- // 转单审核
|
|
|
|
|
|
+ // 确认转单审核
|
|
transferOrderAuditOk (val) {
|
|
transferOrderAuditOk (val) {
|
|
transferAudit({ salesBillSn: this.$route.params.sn, auditPassFlag: val }).then(res => {
|
|
transferAudit({ salesBillSn: this.$route.params.sn, auditPassFlag: val }).then(res => {
|
|
if (res.status == 200) {
|
|
if (res.status == 200) {
|
|
@@ -770,9 +775,11 @@ export default {
|
|
// 一键审核成功
|
|
// 一键审核成功
|
|
this.showDsModal = true
|
|
this.showDsModal = true
|
|
this.$refs.dsModal.setDetail(this.detailData)
|
|
this.$refs.dsModal.setDetail(this.detailData)
|
|
|
|
+ this.spinning = false
|
|
} else {
|
|
} else {
|
|
this.auditText = null
|
|
this.auditText = null
|
|
this.visibleAudit = true
|
|
this.visibleAudit = true
|
|
|
|
+ this.spinning = false
|
|
}
|
|
}
|
|
},
|
|
},
|
|
// 一键审核确定
|
|
// 一键审核确定
|