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. 17
      fe/PC/src/views/rawMaterialManage/materialDirectSend/materialDirectSendNote.vue
  10. 9
      fe/PC/src/views/rawMaterialManage/purchaseOnShelves/PutawayNote.vue
  11. 18
      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 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) { // export function getDictByCode(code) {
// return request({ // return request({

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

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

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

@ -146,7 +146,7 @@ const printEnumOption = {
*/ */
// //
export function initPrintAllData(propsData,name,enumOption,options,url){ 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 _printData = {details:[]}
let _outData = {} let _outData = {}
for(var key in propsData){ 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> </div>
</template> </template>
<script> <script>
import { initDataToHttpFormat } from "@/utils/index"
import { getPageList } from "@/api/wms-api" import { getPageList } from "@/api/wms-api"
import { postInventoryLabelCode_count } from "@/api/wms-core" import { postInventoryLabelCode_count } from "@/api/wms-core"
import currenForm from "@/components/currenForm" import currenForm from "@/components/currenForm"
@ -298,8 +299,8 @@ export default {
itemDesc2: this.selectItemInfo.desc2 || null, itemDesc2: this.selectItemInfo.desc2 || null,
lot: this.selectData.lot || "", lot: this.selectData.lot || "",
// supplierBatch: undefined,// // supplierBatch: undefined,//
arriveDate: this.selectData.arriveDate + '.0000000', arriveDate: initDataToHttpFormat(this.selectData.arriveDate),
produceDate: this.selectData.produceDate + '.0000000', produceDate: initDataToHttpFormat(this.selectData.produceDate),
// expireDate: undefined,// // expireDate: undefined,//
stdPackQty: Number(this.selectItemInfo.stdPackQty) || 0, stdPackQty: Number(this.selectItemInfo.stdPackQty) || 0,
uom: this.selectItemInfo.basicUom || "", uom: this.selectItemInfo.basicUom || "",
@ -323,7 +324,7 @@ export default {
supplierItemCode: this.selectSupplierItemInfo.supplierItemCode, supplierItemCode: this.selectSupplierItemInfo.supplierItemCode,
supplierItemName: this.selectSupplierItemInfo.itemName, supplierItemName: this.selectSupplierItemInfo.itemName,
labelType: this.selectData.labelType, labelType: this.selectData.labelType,
planArriveDate: this.selectPoNumberInfo.planArriveDate + '.0000000', planArriveDate: initDataToHttpFormat(this.selectPoNumberInfo.planArriveDate)
// remark:this.selectData.remark,// // remark:this.selectData.remark,//
} }
// //

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

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

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

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

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

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

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

@ -45,7 +45,7 @@
</div> </div>
</template> </template>
<script> <script>
import { getPageListWip , sumPrint} from '@/api/wms-api' import { getPageListWip , sumPrint,getOneCustomerInfoByCode} from '@/api/wms-api'
import { tableMixins } from "@/mixins/TableMixins" import { tableMixins } from "@/mixins/TableMixins"
import { LoadingMixins } from "@/mixins/LoadingMixins" import { LoadingMixins } from "@/mixins/LoadingMixins"
import { drawerMixins } from "@/mixins/drawerMixins" import { drawerMixins } from "@/mixins/drawerMixins"
@ -101,10 +101,24 @@
this.Loading.tableLoading = false 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) { drawerbutton (val) {
// //
if(val == 'print'){ if(val == 'print'){
this.beforePrintHandle(()=>{
let _option = { let _option = {
details:{ details:{
packingCode:"toPackingCode", packingCode:"toPackingCode",
@ -117,6 +131,7 @@
}).catch(err => { }).catch(err => {
console.log(err) console.log(err)
}) })
})
} }
}, },
}, },

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

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

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

@ -53,7 +53,7 @@
</div> </div>
</template> </template>
<script> <script>
import { getDetailed,purRecNoteCustomInfo } from '@/api/wms-api' import { getDetailed,purRecNoteCustomInfo,getOneSupplierInfoByCode } from '@/api/wms-api'
import { getImgsDetailPopData,Enum } from "@/utils/index" import { getImgsDetailPopData,Enum } from "@/utils/index"
import { tableMixins } from "@/mixins/TableMixins" import { tableMixins } from "@/mixins/TableMixins"
import { LoadingMixins } from "@/mixins/LoadingMixins" import { LoadingMixins } from "@/mixins/LoadingMixins"
@ -193,9 +193,22 @@ 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) { drawerbutton (val) {
// //
if(val == 'print-shd'){ if(val == 'print-shd'){
this.toPrintHttp(()=>{
let _printData = JSON.parse(JSON.stringify(this.propsData)) let _printData = JSON.parse(JSON.stringify(this.propsData))
_printData.details = [] _printData.details = []
let _hg=[],_no=[] let _hg=[],_no=[]
@ -214,9 +227,11 @@ export default {
_printData.details = _hg.concat(_no); _printData.details = _hg.concat(_no);
let data = initPrintAllData(_printData,'cgshd.rdlx'); let data = initPrintAllData(_printData,'cgshd.rdlx');
this.Print(data) this.Print(data)
})
} }
// 退 // 退
if(val == 'print-thd'){ if(val == 'print-thd'){
this.toPrintHttp(()=>{
let _printData = JSON.parse(JSON.stringify(this.propsData)) let _printData = JSON.parse(JSON.stringify(this.propsData))
_printData.details = [] _printData.details = []
this.propsData.details.forEach(item => { this.propsData.details.forEach(item => {
@ -231,6 +246,7 @@ export default {
} }
let data = initPrintAllData(_printData,'thd.rdlx','UnqualifiedReason',_option); let data = initPrintAllData(_printData,'thd.rdlx','UnqualifiedReason',_option);
this.Print(data) this.Print(data)
})
} }
}, },
// table // table

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

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

Loading…
Cancel
Save