增加转采购入库和转销售出库的功能

This commit is contained in:
jishenghua
2025-05-01 22:26:41 +08:00
parent 7583207640
commit f3a40d0d02
6 changed files with 104 additions and 4 deletions

View File

@@ -94,6 +94,7 @@
<div class="table-operator" style="margin-top: 5px">
<a-button v-if="btnEnableList.indexOf(1)>-1" @click="myHandleAdd" type="primary" icon="plus">新增</a-button>
<a-button v-if="btnEnableList.indexOf(1)>-1" icon="delete" @click="batchDel">删除</a-button>
<a-button v-if="quickBtn.purchaseIn && btnEnableList.indexOf(1)>-1" icon="share-alt" @click="transferBill('转采购入库')">转采购入库</a-button>
<a-tooltip title="可将状态是部分采购的单据强制完成">
<a-button v-if="btnEnableList.indexOf(1)>-1" icon="issues-close" @click="batchForceClose">强制结单</a-button>
</a-tooltip>
@@ -184,6 +185,7 @@
<!-- table区域-end -->
<!-- 表单区域 -->
<purchase-order-modal ref="modalForm" @ok="modalFormOk" @close="modalFormClose"></purchase-order-modal>
<purchase-in-modal ref="transferModalForm" @ok="modalFormOk" @close="modalFormClose"></purchase-in-modal>
<bill-detail ref="modalDetail" @ok="modalFormOk" @close="modalFormClose"></bill-detail>
<bill-excel-iframe ref="billExcelIframe" @ok="modalFormOk" @close="modalFormClose"></bill-excel-iframe>
</a-card>
@@ -193,6 +195,7 @@
<!-- by ji sheng hua-->
<script>
import PurchaseOrderModal from './modules/PurchaseOrderModal'
import PurchaseInModal from './modules/PurchaseInModal'
import BillDetail from './dialog/BillDetail'
import BillExcelIframe from '@/components/tools/BillExcelIframe'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
@@ -205,6 +208,7 @@
mixins:[JeecgListMixin,BillListMixin],
components: {
PurchaseOrderModal,
PurchaseInModal,
BillDetail,
BillExcelIframe,
JEllipsis,
@@ -296,6 +300,8 @@
this.initSystemConfig()
this.initSupplier()
this.initUser()
this.initQuickBtn()
this.getDepotByCurrentUser()
},
computed: {
},

View File

@@ -85,6 +85,7 @@
<div class="table-operator" style="margin-top: 5px">
<a-button v-if="btnEnableList.indexOf(1)>-1" @click="myHandleAdd" type="primary" icon="plus">新增</a-button>
<a-button v-if="btnEnableList.indexOf(1)>-1" icon="delete" @click="batchDel">删除</a-button>
<a-button v-if="quickBtn.purchaseIn && btnEnableList.indexOf(1)>-1" icon="share-alt" @click="transferBill('转销售出库')">转销售出库</a-button>
<a-tooltip title="可将状态是部分销售的单据强制完成">
<a-button v-if="btnEnableList.indexOf(1)>-1" icon="issues-close" @click="batchForceClose">强制结单</a-button>
</a-tooltip>
@@ -178,6 +179,7 @@
<!-- table区域-end -->
<!-- 表单区域 -->
<sale-order-modal ref="modalForm" @ok="modalFormOk" @close="modalFormClose"></sale-order-modal>
<sale-out-modal ref="transferModalForm" @ok="modalFormOk" @close="modalFormClose"></sale-out-modal>
<bill-detail ref="modalDetail" @ok="modalFormOk" @close="modalFormClose"></bill-detail>
<bill-excel-iframe ref="billExcelIframe" @ok="modalFormOk" @close="modalFormClose"></bill-excel-iframe>
</a-card>
@@ -186,6 +188,7 @@
</template>
<script>
import SaleOrderModal from './modules/SaleOrderModal'
import SaleOutModal from './modules/SaleOutModal'
import BillDetail from './dialog/BillDetail'
import BillExcelIframe from '@/components/tools/BillExcelIframe'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
@@ -199,6 +202,7 @@
mixins:[JeecgListMixin,BillListMixin],
components: {
SaleOrderModal,
SaleOutModal,
BillDetail,
BillExcelIframe,
JEllipsis,
@@ -288,6 +292,8 @@
this.initCustomer()
this.initUser()
this.getSystemConfig()
this.initQuickBtn()
this.getDepotByCurrentUser()
},
computed: {
},

View File

@@ -19,6 +19,7 @@ export const BillListMixin = {
waitTotal: 0,
dateFormat: 'YYYY-MM-DD',
billExcelUrl: '',
defaultDepotId: '',
supList: [],
cusList: [],
retailList: [],
@@ -397,6 +398,14 @@ export const BillListMixin = {
{ title: '金额', dataIndex: 'allPrice'},
{ title: '备注', dataIndex: 'remark'}
],
quickBtn: {
retailBack: false,
purchaseOrder: false,
purchaseIn: false,
purchaseBack: false,
saleOut: false,
saleBack: false
},
queryParam: {
beginTime: getPrevMonthFormatDate(3),
endTime: getFormatDate(),
@@ -684,6 +693,75 @@ export const BillListMixin = {
}
})
},
//加载快捷按钮:转入库、转出库等
initQuickBtn() {
let btnStrList = Vue.ls.get('winBtnStrList') //按钮功能列表 JSON字符串
if (btnStrList) {
for (let i = 0; i < btnStrList.length; i++) {
if (btnStrList[i].btnStr) {
this.quickBtn.retailBack = btnStrList[i].url === '/bill/retail_back'?btnStrList[i].btnStr.indexOf(1)>-1:this.quickBtn.retailBack
this.quickBtn.purchaseOrder = btnStrList[i].url === '/bill/purchase_order'?btnStrList[i].btnStr.indexOf(1)>-1:this.quickBtn.purchaseOrder
this.quickBtn.purchaseIn = btnStrList[i].url === '/bill/purchase_in'?btnStrList[i].btnStr.indexOf(1)>-1:this.quickBtn.purchaseIn
this.quickBtn.purchaseBack = btnStrList[i].url === '/bill/purchase_back'?btnStrList[i].btnStr.indexOf(1)>-1:this.quickBtn.purchaseBack
this.quickBtn.saleOut = btnStrList[i].url === '/bill/sale_out'?btnStrList[i].btnStr.indexOf(1)>-1:this.quickBtn.saleOut
this.quickBtn.saleBack = btnStrList[i].url === '/bill/sale_back'?btnStrList[i].btnStr.indexOf(1)>-1:this.quickBtn.saleBack
}
}
}
},
getDepotByCurrentUser() {
getAction('/depot/findDepotByCurrentUser').then((res) => {
if (res.code === 200) {
if (res.data.length === 1) {
this.defaultDepotId = res.data[0].id+''
} else {
for (let i = 0; i < res.data.length; i++) {
if(res.data[i].isDefault){
this.defaultDepotId = res.data[i].id+''
}
}
}
}
})
},
//跳转到下一个单据页面
transferBill(type) {
if (this.selectedRowKeys.length <= 0) {
this.$message.warning('请选择一条记录')
} else if (this.selectedRowKeys.length > 1) {
this.$message.warning('只能选择一条记录')
} else {
let info = this.selectionRows[0]
if(info.status === '1' || info.status === '3') {
let param = {
headerId: info.id,
mpList : '',
linkType: 'basic'
}
getAction('/depotItem/getDetailList', param).then((res) => {
if (res.code === 200) {
let transferParam = {
list: res.data.rows,
number: info.number,
organId: info.organId,
discountMoney: info.discountMoney,
deposit: info.deposit,
remark: info.remark,
accountId: info.accountId,
salesMan: info.salesMan
}
this.$refs.transferModalForm.action = "add"
this.$refs.transferModalForm.transferParam = transferParam
this.$refs.transferModalForm.defaultDepotId = this.defaultDepotId
this.$refs.transferModalForm.add()
this.$refs.transferModalForm.title = type
}
})
} else {
this.$message.warning('该状态不能' + type + '')
}
}
},
//列设置更改事件
onColChange (checkedValues) {
this.columns = this.defColumns.filter(item => {

View File

@@ -19,6 +19,8 @@ export const BillModalMixin = {
value: ''
},
currentSelectDepotId: '',
transferParam: {},
defaultDepotId: '',
depotList: [],
accountList: [],
accountIdList: [],

View File

@@ -355,6 +355,8 @@
this.fileList = []
this.$nextTick(() => {
handleIntroJs(this.prefixNo, 1)
let tp = this.transferParam
this.linkBillListOk(tp.list, tp.number, tp.organId, tp.discountMoney, tp.deposit, tp.remark, this.defaultDepotId, tp.accountId)
})
} else {
if(this.model.linkNumber) {
@@ -466,8 +468,10 @@
}
info.linkId = info.id
allTaxLastMoney += info.taxLastMoney
listEx.push(info)
this.changeColumnShow(info)
if(info.operNumber>0) {
listEx.push(info)
this.changeColumnShow(info)
}
}
this.materialTable.dataSource = listEx
///给优惠后金额重新赋值

View File

@@ -371,6 +371,8 @@
this.fileList = []
this.$nextTick(() => {
handleIntroJs(this.prefixNo, 1)
let tp = this.transferParam
this.linkBillListOk(tp.list, tp.number, tp.organId, tp.discountMoney, tp.deposit, tp.remark, this.defaultDepotId, tp.accountId, tp.salesMan)
})
} else {
if(this.model.linkNumber) {
@@ -483,8 +485,10 @@
}
info.linkId = info.id
allTaxLastMoney += info.taxLastMoney
listEx.push(info)
this.changeColumnShow(info)
if(info.operNumber>0) {
listEx.push(info)
this.changeColumnShow(info)
}
}
this.materialTable.dataSource = listEx
///给优惠后金额重新赋值