Browse Source

Merge branch 'dev_web' of http://dev.ccwin-in.com:3000/BoXu.Zheng/WZC2 into dev_web

dev_web_online
陈薪名 2 years ago
parent
commit
ada5e54a59
  1. 16
      fe/PC/src/api/wms-api.js
  2. 5
      fe/PC/src/mixins/mixins.js
  3. 2
      fe/PC/src/mixins/printMixin.js
  4. 5
      fe/PC/src/utils/index.js
  5. 7
      fe/PC/src/views/labelManage/PartiallyPreparedProducts/PartiallyPreparedProducts.vue
  6. 7
      fe/PC/src/views/labelManage/PartiallyPreparedProducts/RecycledMaterialsLabel.vue
  7. 7
      fe/PC/src/views/labelManage/PartiallyPreparedProducts/productionReturnLabel.vue
  8. 25
      fe/PC/src/views/rawMaterialManage/beforeGroundingReturn/beforeGroundingReturnNote.vue
  9. 37
      fe/PC/src/views/rawMaterialManage/materialDirectSend/materialDirectSendNote.vue
  10. 9
      fe/PC/src/views/rawMaterialManage/purchaseOnShelves/PutawayNote.vue
  11. 80
      fe/PC/src/views/rawMaterialManage/purchaseReceipt/PurchaseReceiptNote-msQuery.vue
  12. 28
      fe/PC/src/views/rawMaterialManage/purchaseReturn/returnNote.vue

16
fe/PC/src/api/wms-api.js

@ -532,6 +532,22 @@ export function allSupplierByCodes(data) {
data
})
}
// 根据code获取当前供应商信息 打印需要获取供应商信息(供应商简称等)相关位置
export function getOneSupplierInfoByCode(code) {
return request({
url: baseURL + 'basedata/supplier/by-code/' + code,
method: 'get'
})
}
// 根据code获取当前客户信息 打印需要获取供应商信息(客户地址等)相关位置
export function getOneCustomerInfoByCode(code) {
return request({
url: baseURL + 'basedata/customer/by-code/' + code,
method: 'get'
})
}
// 根据编号获取字典信息
// export function getDictByCode(code) {
// return request({

5
fe/PC/src/mixins/mixins.js

@ -166,6 +166,11 @@ export const mixins = {
},
//打印标签
Print(val) {
let that = this
if(!val){
that.$warningMsg('暂无可打印数据')
return
}
const loading = this.$loading({
lock: true,
text: 'Loading',

2
fe/PC/src/mixins/printMixin.js

@ -146,7 +146,7 @@ const printEnumOption = {
*/
//
export function initPrintAllData(propsData,name,enumOption,options,url){
if(!propsData || propsData.details.length <= 0)return {}
if(!propsData || propsData.details.length <= 0)return false
let _printData = {details:[]}
let _outData = {}
for(var key in propsData){

5
fe/PC/src/utils/index.js

@ -542,4 +542,7 @@ export function dictFormatData() {
// })
// }
// 像接口传参时候需要补充.0000000 否则会报错情况下转义
export function initDataToHttpFormat (date) {
return date ? date + '.0000000' : undefined
}

7
fe/PC/src/views/labelManage/PartiallyPreparedProducts/PartiallyPreparedProducts.vue

@ -57,6 +57,7 @@
</div>
</template>
<script>
import { initDataToHttpFormat } from "@/utils/index"
import { getPageList } from "@/api/wms-api"
import { postInventoryLabelCode_count } from "@/api/wms-core"
import currenForm from "@/components/currenForm"
@ -298,8 +299,8 @@ export default {
itemDesc2: this.selectItemInfo.desc2 || null,
lot: this.selectData.lot || "",
// supplierBatch: undefined,//
arriveDate: this.selectData.arriveDate + '.0000000',
produceDate: this.selectData.produceDate + '.0000000',
arriveDate: initDataToHttpFormat(this.selectData.arriveDate),
produceDate: initDataToHttpFormat(this.selectData.produceDate),
// expireDate: undefined,//
stdPackQty: Number(this.selectItemInfo.stdPackQty) || 0,
uom: this.selectItemInfo.basicUom || "",
@ -323,7 +324,7 @@ export default {
supplierItemCode: this.selectSupplierItemInfo.supplierItemCode,
supplierItemName: this.selectSupplierItemInfo.itemName,
labelType: this.selectData.labelType,
planArriveDate: this.selectPoNumberInfo.planArriveDate + '.0000000',
planArriveDate: initDataToHttpFormat(this.selectPoNumberInfo.planArriveDate)
// remark:this.selectData.remark,//
}
//

7
fe/PC/src/views/labelManage/PartiallyPreparedProducts/RecycledMaterialsLabel.vue

@ -58,6 +58,7 @@
</template>
<script>
import { getPageList } from "@/api/wms-api"
import { initDataToHttpFormat } from "@/utils/index"
import { postInventoryLabelCode_count } from "@/api/wms-core"
import currenForm from "@/components/currenForm"
import StepsFormAlone from "@/components/StepsFormAlone"
@ -295,8 +296,8 @@ export default {
itemDesc2: this.selectItemInfo.desc2 || null,
lot: this.selectData.lot || "",
// supplierBatch: undefined,//
arriveDate: this.selectData.arriveDate + '.0000000',
produceDate: this.selectData.produceDate + '.0000000',
arriveDate: initDataToHttpFormat(this.selectData.arriveDate),
produceDate: initDataToHttpFormat(this.selectData.produceDate),
// expireDate: undefined,//
stdPackQty: Number(this.selectItemInfo.stdPackQty) || 0,
uom: this.selectItemInfo.basicUom || "",
@ -320,7 +321,7 @@ export default {
supplierItemCode: this.selectSupplierItemInfo.supplierItemCode,
supplierItemName: this.selectSupplierItemInfo.itemName,
labelType: this.selectData.labelType,
planArriveDate: this.selectPoNumberInfo.planArriveDate + '.0000000',
planArriveDate: initDataToHttpFormat(this.selectPoNumberInfo.planArriveDate),
remark:this.selectData.remark,//
}
//

7
fe/PC/src/views/labelManage/PartiallyPreparedProducts/productionReturnLabel.vue

@ -58,6 +58,7 @@
</div>
</template>
<script>
import { initDataToHttpFormat } from "@/utils/index"
import { postInventoryLabelCode_count } from "@/api/wms-core"
import currenForm from "@/components/currenForm"
import StepsFormAlone from "@/components/StepsFormAlone"
@ -249,8 +250,8 @@ export default {
itemDesc2: this.selectItemInfo.desc2 || null,
lot: this.selectData.lot || "",
// supplierBatch: undefined,//
arriveDate: this.selectData.arriveDate + '.0000000',
produceDate: this.selectData.produceDate + '.0000000',
arriveDate: initDataToHttpFormat(this.selectData.arriveDate),
produceDate: initDataToHttpFormat(this.selectData.produceDate),
// expireDate: undefined,//
stdPackQty: Number(this.selectItemInfo.stdPackQty) || 0,
uom: this.selectItemInfo.basicUom || "",
@ -274,7 +275,7 @@ export default {
supplierItemCode: this.selectSupplierInfo.supplierItemCode,
supplierItemName: this.selectSupplierInfo.itemName,
labelType: 1,
planArriveDate: this.poNumberInfo.planArriveDate + '.0000000',
planArriveDate: initDataToHttpFormat(this.poNumberInfo.planArriveDate),
remark:this.selectData.remark,//
}
//

25
fe/PC/src/views/rawMaterialManage/beforeGroundingReturn/beforeGroundingReturnNote.vue

@ -44,7 +44,7 @@
</div>
</template>
<script>
import { getPageListWip,allSupplierByCodes } from "@/api/wms-api"
import { getPageListWip,getOneSupplierInfoByCode } from "@/api/wms-api"
import { tableMixins } from "@/mixins/TableMixins"
import { LoadingMixins } from "@/mixins/LoadingMixins"
import { drawerMixins } from "@/mixins/drawerMixins"
@ -107,21 +107,18 @@ export default {
drawerbutton (val) {
//
if(val == 'print'){
// if((this.propsData.supplierCode) && (!this.propsData.supplierName || !this.propsData.supplierShortName)){
// allSupplierByCodes([this.propsData.supplierCode]).then(res => {
// if(res.length > 0){
// this.propsData.supplierName = res[0].name
// this.propsData.supplierShortName = res[0].shortName
// }
// let data = initPrintAllData(this.propsData,'thd.rdlx','UnqualifiedReason');
// this.Print(data)
// }).catch(err => {
// console.log(err)
// })
// }else{
if((this.propsData.supplierCode) && (!this.propsData.supplierShortName)){
getOneSupplierInfoByCode(this.propsData.supplierCode).then(res => {
this.propsData.supplierShortName = res.shortName || res.name
let data = initPrintAllData(this.propsData,'thd.rdlx','UnqualifiedReason');
this.Print(data)
}).catch(err => {
console.log(err)
})
}else{
let data = initPrintAllData(this.propsData,'thd.rdlx','UnqualifiedReason');
this.Print(data)
// }
}
}
},
}

37
fe/PC/src/views/rawMaterialManage/materialDirectSend/materialDirectSendNote.vue

@ -45,7 +45,7 @@
</div>
</template>
<script>
import { getPageListWip , sumPrint} from '@/api/wms-api'
import { getPageListWip , sumPrint,getOneCustomerInfoByCode} from '@/api/wms-api'
import { tableMixins } from "@/mixins/TableMixins"
import { LoadingMixins } from "@/mixins/LoadingMixins"
import { drawerMixins } from "@/mixins/drawerMixins"
@ -101,21 +101,36 @@
this.Loading.tableLoading = false
})
},
beforePrintHandle(callback){
if((this.propsData.customerCode)){
getOneCustomerInfoByCode(this.propsData.customerCode).then(res => {
this.propsData.customerAddressCode = res.address
callback()
}).catch(err => {
console.log(err)
})
}else{
callback()
}
},
//
drawerbutton (val) {
//
if(val == 'print'){
let _option = {
details:{
packingCode:"toPackingCode",
this.beforePrintHandle(()=>{
let _option = {
details:{
packingCode:"toPackingCode",
}
}
}
let data = initPrintAllData(this.propsData,'chdmxb.rdlx',false,_option);
this.Print(data)
sumPrint(this.propsData.number, this.URL).then(res => {
this.paging()
}).catch(err => {
console.log(err)
let data = initPrintAllData(this.propsData,'chdmxb.rdlx',false,_option);
this.Print(data)
sumPrint(this.propsData.number, this.URL).then(res => {
this.paging()
}).catch(err => {
console.log(err)
})
})
}
},

9
fe/PC/src/views/rawMaterialManage/purchaseOnShelves/PutawayNote.vue

@ -45,7 +45,7 @@
</div>
</template>
<script>
import { getPageListWip,allSupplierByCodes } from "@/api/wms-api"
import { getPageListWip,getOneSupplierInfoByCode } from "@/api/wms-api"
import { tableMixins } from "@/mixins/TableMixins"
import { LoadingMixins } from "@/mixins/LoadingMixins"
import { drawerMixins } from "@/mixins/drawerMixins"
@ -99,10 +99,17 @@ export default {
this.Loading.tableLoading = false
})
},
getSupplier(){
return getOneSupplierInfoByCode(this.propsData.supplierCode)
},
//
drawerbutton (val) {
//
if(val == 'print'){
// Promise.all([this.getSupplier()])
// .then((supplier) => {
// console.log(supplier)
// });
// if((this.propsData.supplierCode) && (!this.propsData.supplierName || !this.propsData.supplierShortName)){
// this.Loading.tableLoading = true
// allSupplierByCodes([this.propsData.supplierCode]).then(res => {

80
fe/PC/src/views/rawMaterialManage/purchaseReceipt/PurchaseReceiptNote-msQuery.vue

@ -53,7 +53,7 @@
</div>
</template>
<script>
import { getDetailed,purRecNoteCustomInfo } from '@/api/wms-api'
import { getDetailed,purRecNoteCustomInfo,getOneSupplierInfoByCode } from '@/api/wms-api'
import { getImgsDetailPopData,Enum } from "@/utils/index"
import { tableMixins } from "@/mixins/TableMixins"
import { LoadingMixins } from "@/mixins/LoadingMixins"
@ -193,44 +193,60 @@ export default {
})
})
},
toPrintHttp(callback){
if((this.propsData.supplierCode) && (!this.propsData.supplierShortName)){
getOneSupplierInfoByCode(this.propsData.supplierCode).then(res => {
this.propsData.supplierShortName = res.shortName || res.name
callback()
}).catch(err => {
console.log(err)
})
}else{
callback()
}
},
drawerbutton (val) {
//
if(val == 'print-shd'){
let _printData = JSON.parse(JSON.stringify(this.propsData))
_printData.details = []
let _hg=[],_no=[]
this.propsData.details.forEach(item => {
if(item.purchaseReceiptInspectStatus == 2){
item.statusStr = "合格"
item.reasonStr = ""
_hg.push(item)
}
// else if(item.purchaseReceiptInspectStatus == 3){
// item.statusStr = ""
// item.reasonStr = Enum(this.$store.getters.dictionaries.UnqualifiedReason, item.failedReason , 'label')
// _no.push(item)
// }
});
_printData.details = _hg.concat(_no);
let data = initPrintAllData(_printData,'cgshd.rdlx');
this.Print(data)
this.toPrintHttp(()=>{
let _printData = JSON.parse(JSON.stringify(this.propsData))
_printData.details = []
let _hg=[],_no=[]
this.propsData.details.forEach(item => {
if(item.purchaseReceiptInspectStatus == 2){
item.statusStr = "合格"
item.reasonStr = ""
_hg.push(item)
}
// else if(item.purchaseReceiptInspectStatus == 3){
// item.statusStr = ""
// item.reasonStr = Enum(this.$store.getters.dictionaries.UnqualifiedReason, item.failedReason , 'label')
// _no.push(item)
// }
});
_printData.details = _hg.concat(_no);
let data = initPrintAllData(_printData,'cgshd.rdlx');
this.Print(data)
})
}
// 退
if(val == 'print-thd'){
let _printData = JSON.parse(JSON.stringify(this.propsData))
_printData.details = []
this.propsData.details.forEach(item => {
if(item.purchaseReceiptInspectStatus == 3){
_printData.details.push(item)
}
});
let _option = {
details:{
reason:"failedReason"
this.toPrintHttp(()=>{
let _printData = JSON.parse(JSON.stringify(this.propsData))
_printData.details = []
this.propsData.details.forEach(item => {
if(item.purchaseReceiptInspectStatus == 3){
_printData.details.push(item)
}
});
let _option = {
details:{
reason:"failedReason"
}
}
}
let data = initPrintAllData(_printData,'thd.rdlx','UnqualifiedReason',_option);
this.Print(data)
let data = initPrintAllData(_printData,'thd.rdlx','UnqualifiedReason',_option);
this.Print(data)
})
}
},
// table

28
fe/PC/src/views/rawMaterialManage/purchaseReturn/returnNote.vue

@ -44,7 +44,7 @@
</div>
</template>
<script>
import { getPageListWip,allSupplierByCodes } from "@/api/wms-api"
import { getPageListWip,getOneSupplierInfoByCode } from "@/api/wms-api"
import { tableMixins } from "@/mixins/TableMixins"
import { LoadingMixins } from "@/mixins/LoadingMixins"
import { drawerMixins } from "@/mixins/drawerMixins"
@ -107,24 +107,18 @@ export default {
drawerbutton (val) {
//
if(val == 'print'){
// if((this.propsData.supplierCode) && (!this.propsData.supplierName || !this.propsData.supplierShortName)){
// this.Loading.appMainLoading = true
// allSupplierByCodes([this.propsData.supplierCode]).then(res => {
// this.Loading.appMainLoading = false
// if(res.length > 0){
// this.propsData.supplierName = res[0].name
// this.propsData.supplierShortName = res[0].shortName
// }
// let data = initPrintAllData(this.propsData,'thd.rdlx','PurReturnReason');
// this.Print(data)
// }).catch(err => {
// this.Loading.appMainLoading = false
// console.log(err)
// })
// }else{
if((this.propsData.supplierCode) && (!this.propsData.supplierShortName)){
getOneSupplierInfoByCode(this.propsData.supplierCode).then(res => {
this.propsData.supplierShortName = res.shortName || res.name
let data = initPrintAllData(this.propsData,'thd.rdlx','PurReturnReason');
this.Print(data)
}).catch(err => {
console.log(err)
})
}else{
let data = initPrintAllData(this.propsData,'thd.rdlx','PurReturnReason');
this.Print(data)
// }
}
}
},
}

Loading…
Cancel
Save