81 changed files with 4999 additions and 3115 deletions
File diff suppressed because it is too large
File diff suppressed because it is too large
File diff suppressed because it is too large
@ -0,0 +1,297 @@ |
|||||
|
<template> |
||||
|
<div class="appMainPage" v-loading="pageLoading"> |
||||
|
<!-- 标签管理-业务标签-半成品上架标签 --> |
||||
|
<StepsFormAlone |
||||
|
:stepArray="stepArray" |
||||
|
ref="steps_bcpsj" |
||||
|
:hideLastBtsn="true" |
||||
|
> |
||||
|
<template v-slot:stepSlot1> |
||||
|
<curren-Form |
||||
|
ref="form_bcpsj" |
||||
|
size="medium" |
||||
|
:searchData="selectData" |
||||
|
:searchForm="selectForm" |
||||
|
:rules="selectRules" |
||||
|
:searchOptions="editOptions" |
||||
|
@push="detailsDataPush(arguments)" |
||||
|
></curren-Form> |
||||
|
</template> |
||||
|
<template v-slot:stepSlot2> |
||||
|
<currenTableFlex |
||||
|
:flexTableData="flexSelectTableData" |
||||
|
:flexSearchOptions="editOptions" |
||||
|
:flexTableColumns="flexTableColumns" |
||||
|
:showAddBtn="false" |
||||
|
:showAllDeleteButton="false" |
||||
|
:isShowIndex="true" |
||||
|
></currenTableFlex> |
||||
|
</template> |
||||
|
<template v-slot:stepSlot3> |
||||
|
<!-- 结果 --> |
||||
|
<resultStatus> |
||||
|
<template> |
||||
|
<el-button @click="rest()">返回</el-button> |
||||
|
<el-button type="primary" @click="printHandle()">打印</el-button> |
||||
|
</template> |
||||
|
</resultStatus> |
||||
|
</template> |
||||
|
</StepsFormAlone> |
||||
|
<!-- 搜索按钮——窗体组件 --> |
||||
|
<searchPage |
||||
|
ref="searchTable" |
||||
|
:tableLoading="Loading.autoTableLoading" |
||||
|
:advancedFilter="advancedFilter()" |
||||
|
:filterPageListParams="filterPageListParams" |
||||
|
:formTitle="searchTitle" |
||||
|
:displayDialog="displayDialog.AddNewDialog" |
||||
|
:searchTableData="searchData" |
||||
|
:searchTableColumns="searchColumns" |
||||
|
:searchTotalCount="searchTotalCount" |
||||
|
:supplierItemPage="searchPageListParams" |
||||
|
@handleSelectionChange="prepareFormData" |
||||
|
@SizeChange="searchAlterResultCount($event, searchPageListParams)" |
||||
|
@CurrentChange="searchAlertoldSkipCount($event, searchPageListParams)" |
||||
|
@tableButtonClick="searchSubmit(arguments)" |
||||
|
></searchPage> |
||||
|
</div> |
||||
|
</template> |
||||
|
<script> |
||||
|
import { postInventoryLabelCode_count } from "@/api/wms-core" |
||||
|
import currenForm from "@/components/currenForm" |
||||
|
import StepsFormAlone from "@/components/StepsFormAlone" |
||||
|
import resultStatus from "@/components/resultStatus" |
||||
|
import currenTableFlex from "@/components/currenTableFlex" |
||||
|
import {initPrintPackingCodeManyData} from "@/mixins/printMixin" |
||||
|
import { getPageList,getDetailed} from "@/api/wms-api" |
||||
|
import _ from "lodash" |
||||
|
import { mixins } from "@/mixins/mixins" |
||||
|
import { LoadingMixins } from "@/mixins/LoadingMixins" |
||||
|
import { filterSelectMixins } from '@/mixins/filter-Select' |
||||
|
export default { |
||||
|
name: "PartiallyPreparedProductsLabel", |
||||
|
mixins: [ |
||||
|
mixins, |
||||
|
LoadingMixins, |
||||
|
filterSelectMixins |
||||
|
], |
||||
|
components: { |
||||
|
currenForm, |
||||
|
StepsFormAlone, |
||||
|
currenTableFlex, |
||||
|
resultStatus, |
||||
|
}, |
||||
|
data () { |
||||
|
let _this = this |
||||
|
return { |
||||
|
pageLoading:false, |
||||
|
// 步骤条options |
||||
|
stepArray:[ |
||||
|
{title:"信息筛选",next:()=>{return _this.firstNext()}}, |
||||
|
{title:"预览信息"}, |
||||
|
{title:"打印"}, |
||||
|
], |
||||
|
itemPackInfo:{},//已选物品对应的包装信息 |
||||
|
selectItemInfo:{},//已选物品信息 |
||||
|
// 筛选数据 |
||||
|
selectData:{ |
||||
|
itemCode:"", |
||||
|
itemName:"", |
||||
|
canMake:null,//制造件 |
||||
|
packQty:"", |
||||
|
qty:"", |
||||
|
lot:"", |
||||
|
labelQty:"", |
||||
|
}, |
||||
|
// 筛选条件 |
||||
|
selectForm:[ |
||||
|
{ type: "filterSelect", label: "物品代码", prop: "itemCode", optionsLabel: "name", optionsValue: "code", |
||||
|
focus: (type,val) => { return this.getFilterList(type, val, "basedata/item-basic", [ |
||||
|
{logic:"And",column:"canMake",action:"==",value:"true"}, |
||||
|
{logic:"And",column:"type",action:"==",value:"半成品"} |
||||
|
])}, |
||||
|
searchButton: (val) => { this.showSerarchPage(val, 'basedata/Item-Basic', 'ItemBasic', '物品代码', this.selectData,[ |
||||
|
{logic:"And",column:"canMake",action:"==",value:"true"}, |
||||
|
{logic:"And",column:"type",action:"==",value:"半成品"} |
||||
|
]) }, |
||||
|
colSpan: 12, |
||||
|
}, |
||||
|
{ type: "input",disabled:true,label: "物品名称", prop: "itemName", colSpan: 12 }, |
||||
|
{ type: "select",disabled:true, label: "制造件", prop: "canMake", options: "whetherOrNot", colSpan: 12 }, |
||||
|
{ type: "input",disabled:true,label: "标包数量", prop: "packQty", colSpan: 12 }, |
||||
|
{ type: "inputNumber", label: "实际数量", prop: "qty",colSpan: 12}, |
||||
|
{ type: "input", label: "批次", prop: "lot", colSpan: 12 }, |
||||
|
{ type: "inputNumber", label: "标签个数", prop: "labelQty", min:1,colSpan: 12 }, |
||||
|
], |
||||
|
// 筛选Rules |
||||
|
selectRules:{ |
||||
|
itemCode: [{ required: true, trigger: "change", message: "物品代码不能为空" }], |
||||
|
lot: [{ required: true, trigger: "change", message: "批次不能为空" }], |
||||
|
qty: [{ required: true, trigger: "change", message: "实际数量不能为空" }], |
||||
|
labelQty: [{ required: true, trigger: "change", message: "标签个数不能为空" }], |
||||
|
}, |
||||
|
// 格头部信息 |
||||
|
flexTableColumns:[ |
||||
|
{ width:"auto",label: "物品代码", prop: "itemCode", }, |
||||
|
{ width:"auto",label: "物品名称", prop: "itemName", }, |
||||
|
{ width:"auto",label: "批次", prop: "lot", }, |
||||
|
{ width:"auto",label: "标包数量", prop: "packQty", }, |
||||
|
{ width:"auto",label: "标包单位", prop: "packUom", }, |
||||
|
{ width:"auto",label: "实际数量", prop: "qty", }, |
||||
|
{ width:"auto",label: "生产日期", prop: "produceDate",type: "dateTime" }, |
||||
|
{ width:"auto",label: "箱标签", prop: "packingCode",fixed:"right" }, |
||||
|
], |
||||
|
// 已选数据信息 |
||||
|
flexSelectTableData:[] |
||||
|
}; |
||||
|
}, |
||||
|
methods: { |
||||
|
// 返回 |
||||
|
rest(){ |
||||
|
this.itemPackInfo = {} |
||||
|
this.selectItemInfo={}; |
||||
|
this.selectData={ |
||||
|
itemCode:"", |
||||
|
itemName:"", |
||||
|
canMake:null,//制造件 |
||||
|
packQty:"", |
||||
|
qty:"", |
||||
|
lot:"", |
||||
|
labelQty:"", |
||||
|
}; |
||||
|
this.flexSelectTableData = []; |
||||
|
this.$refs.steps_bcpsj.returnFirstActive() |
||||
|
this.$refs.form_bcpsj.getDom().resetFields(); |
||||
|
}, |
||||
|
// 第一部物品代码点击拉取 |
||||
|
detailsDataPush (val) { |
||||
|
if(val[1].prop == "itemCode"){ |
||||
|
this.pageLoading = true |
||||
|
let params = { |
||||
|
condition: { |
||||
|
filters: [] |
||||
|
} |
||||
|
} |
||||
|
params.condition.filters.push(...this.isFilter("itemCode", this.selectData.itemCode)) |
||||
|
getPageList(params, "basedata/item-pack") |
||||
|
.then(res => { |
||||
|
if (res.items.length > 0) { |
||||
|
this.itemPackInfo = res.items[0] |
||||
|
this.selectData.packQty=res.items[0].qty |
||||
|
// this.selectItemInfo = res.items[0]; |
||||
|
} |
||||
|
getDetailed(val[0].id, "basedata/item-basic").then(res => { |
||||
|
this.pageLoading = false |
||||
|
this.selectItemInfo = Object.assign(this.selectItemInfo,res); |
||||
|
this.selectData.itemName=this.selectItemInfo.name; |
||||
|
this.selectData.canMake=this.selectItemInfo.canMake; |
||||
|
}) |
||||
|
.catch(err => { |
||||
|
this.pageLoading = false |
||||
|
}) |
||||
|
}) |
||||
|
.catch(err => { |
||||
|
this.pageLoading = false |
||||
|
}) |
||||
|
|
||||
|
} |
||||
|
|
||||
|
}, |
||||
|
// 第一步骤下一步操作 |
||||
|
firstNext(){ |
||||
|
return new Promise((resolve,reject) => { |
||||
|
this.$refs['form_bcpsj'].getDom().validate(valid=>{ |
||||
|
if(valid){ |
||||
|
let _data = { |
||||
|
fullBarcodeString: undefined,//获取不到 |
||||
|
itemCode: this.selectData.itemCode || null, |
||||
|
itemName: this.selectItemInfo.name || null, |
||||
|
itemDesc1: this.selectItemInfo.desc1 || null, |
||||
|
itemDesc2: this.selectItemInfo.desc2 || null, |
||||
|
lot: this.selectData.lot || "", |
||||
|
supplierBatch: undefined,//获取不到 |
||||
|
arriveDate: undefined,//获取不到 |
||||
|
produceDate: undefined,//获取不到 |
||||
|
expireDate: undefined,//获取不到 |
||||
|
stdPackQty: Number(this.selectItemInfo.stdPackQty) || 0, |
||||
|
uom: this.selectItemInfo.basicUom || "", |
||||
|
qty: Number(this.selectData.qty), |
||||
|
labelStatus: undefined,//获取不到 |
||||
|
recommendLocationCode: undefined,//获取不到 |
||||
|
locationErpCode: undefined,//获取不到 |
||||
|
containerCode: undefined,//获取不到 |
||||
|
poNumber: undefined,//获取不到 |
||||
|
rpNumber: undefined,//获取不到 |
||||
|
asnNumber: undefined,//获取不到 |
||||
|
qLevel: undefined,//获取不到 |
||||
|
qualityFile: undefined,//获取不到 |
||||
|
prodLine: undefined,//获取不到 |
||||
|
team: undefined,//获取不到 |
||||
|
shift: undefined,//获取不到 |
||||
|
specifications: this.selectItemInfo.color || null, |
||||
|
supplierCode: undefined,//生产标签不需要 |
||||
|
supplierName: undefined,//生产标签不需要 |
||||
|
supplierSimpleName: undefined,//生产标签不需要 |
||||
|
supplierItemCode: undefined,//生产标签不需要 |
||||
|
supplierItemName: undefined,//生产标签不需要 |
||||
|
labelType: 2, |
||||
|
planArriveDate: undefined,//获取不到 |
||||
|
} |
||||
|
// let _data = this.selectItemInfo |
||||
|
// _data.itemCode=this.selectData.itemCode, |
||||
|
// _data.itemName= this.selectData.itemName, |
||||
|
// _data.stdPackQty= Number(this.selectData.packQty) || 0, |
||||
|
// _data.lot=this.selectData.lot, |
||||
|
// _data.qty=Number(this.selectData.qty), |
||||
|
// _data.uom= this.selectItemInfo.basicUom || "", |
||||
|
// _data.itemDesc1= this.selectItemInfo.desc1 || "", |
||||
|
// _data.itemDesc2= this.selectItemInfo.desc2 || "", |
||||
|
// _data.labelType= 2, |
||||
|
// _data.company= localStorage.getItem("company"), |
||||
|
// 生成标签(接口) |
||||
|
this.pageLoading = true; |
||||
|
postInventoryLabelCode_count({count:this.selectData.labelQty}, _data) |
||||
|
.then(res => { |
||||
|
this.pageLoading = false |
||||
|
this.flexSelectTableData = res |
||||
|
this.flexSelectTableData.forEach(item=>{ |
||||
|
item.packingCode=item.code |
||||
|
item.packQty=this.itemPackInfo.qty |
||||
|
item.packUom=this.itemPackInfo.basicUom |
||||
|
}) |
||||
|
resolve() |
||||
|
}) |
||||
|
.catch(err => { |
||||
|
this.pageLoading = false |
||||
|
reject() |
||||
|
}) |
||||
|
} |
||||
|
}) |
||||
|
}) |
||||
|
}, |
||||
|
// 打印 |
||||
|
printHandle(){ |
||||
|
// let _printData = {details:[]} |
||||
|
let _printData = this.flexSelectTableData[0] |
||||
|
_printData.details = [] |
||||
|
this.flexSelectTableData.forEach(item=>{ |
||||
|
_printData.details.push(item) |
||||
|
}) |
||||
|
_printData.title = "半成品上架标签" |
||||
|
this.Print(initPrintPackingCodeManyData(_printData)) |
||||
|
}, |
||||
|
//过滤查询条件 |
||||
|
isFilter (val, data) { |
||||
|
let filter = [ |
||||
|
{ |
||||
|
logic: "And", |
||||
|
column: val, |
||||
|
action: "==", |
||||
|
value: data |
||||
|
} |
||||
|
] |
||||
|
return filter |
||||
|
}, |
||||
|
}, |
||||
|
} |
||||
|
</script> |
@ -0,0 +1,424 @@ |
|||||
|
<template> |
||||
|
<div class="appMainPage" v-loading="pageLoading"> |
||||
|
<!-- 标签管理-业务标签-创建标签(原回收料标签) --> |
||||
|
<StepsFormAlone |
||||
|
:stepArray="stepArray" |
||||
|
ref="steps_create" |
||||
|
:hideLastBtsn="true" |
||||
|
> |
||||
|
<template v-slot:stepSlot1> |
||||
|
<curren-Form |
||||
|
ref="form_create" |
||||
|
size="medium" |
||||
|
:searchData="selectData" |
||||
|
:searchForm="selectForm" |
||||
|
:rules="selectRules" |
||||
|
:searchOptions="editOptions" |
||||
|
@push="detailsDataPush(arguments)" |
||||
|
></curren-Form> |
||||
|
</template> |
||||
|
<template v-slot:stepSlot2> |
||||
|
<currenTableFlex |
||||
|
:flexTableData="flexSelectTableData" |
||||
|
:flexSearchOptions="editOptions" |
||||
|
:flexTableColumns="flexTableColumns" |
||||
|
:showAddBtn="false" |
||||
|
:showAllDeleteButton="false" |
||||
|
:isShowIndex="true" |
||||
|
></currenTableFlex> |
||||
|
</template> |
||||
|
<template v-slot:stepSlot3> |
||||
|
<!-- 结果 --> |
||||
|
<resultStatus> |
||||
|
<template> |
||||
|
<el-button @click="rest()">返回</el-button> |
||||
|
<el-button type="primary" @click="printHandle()">打印</el-button> |
||||
|
</template> |
||||
|
</resultStatus> |
||||
|
</template> |
||||
|
</StepsFormAlone> |
||||
|
<!-- 搜索按钮——窗体组件 --> |
||||
|
<searchPage |
||||
|
ref="searchTable" |
||||
|
:tableLoading="Loading.autoTableLoading" |
||||
|
:advancedFilter="advancedFilter()" |
||||
|
:filterPageListParams="filterPageListParams" |
||||
|
:formTitle="searchTitle" |
||||
|
:displayDialog="displayDialog.AddNewDialog" |
||||
|
:searchTableData="searchData" |
||||
|
:searchTableColumns="searchColumns" |
||||
|
:searchTotalCount="searchTotalCount" |
||||
|
:supplierItemPage="searchPageListParams" |
||||
|
@handleSelectionChange="prepareFormData" |
||||
|
@SizeChange="searchAlterResultCount($event, searchPageListParams)" |
||||
|
@CurrentChange="searchAlertoldSkipCount($event, searchPageListParams)" |
||||
|
@tableButtonClick="searchSubmit(arguments)" |
||||
|
></searchPage> |
||||
|
|
||||
|
<!-- 制造件/采购件选择 --> |
||||
|
<el-dialog |
||||
|
:title="canTypeTitle" |
||||
|
:visible.sync="canTypeShow" |
||||
|
> |
||||
|
<el-form :model="canForm" :rules="canRules" ref="form_canType" > |
||||
|
<el-form-item prop="canType"> |
||||
|
<el-radio v-model="canForm.canType" label="1">采购标签</el-radio> |
||||
|
<el-radio v-model="canForm.canType" label="2">生产标签</el-radio> |
||||
|
</el-form-item> |
||||
|
</el-form> |
||||
|
<div slot="footer" class="dialog-footer"> |
||||
|
<el-button @click="canSelectHandle('0')">取 消</el-button> |
||||
|
<el-button type="primary" @click="canSelectHandle('1')">确 定</el-button> |
||||
|
</div> |
||||
|
</el-dialog> |
||||
|
</div> |
||||
|
</template> |
||||
|
<script> |
||||
|
import { postInventoryLabelCode_count } from "@/api/wms-core" |
||||
|
import currenForm from "@/components/currenForm" |
||||
|
import StepsFormAlone from "@/components/StepsFormAlone" |
||||
|
import resultStatus from "@/components/resultStatus" |
||||
|
import currenTableFlex from "@/components/currenTableFlex" |
||||
|
import {initPrintPackingCodeManyData} from "@/mixins/printMixin" |
||||
|
import _ from "lodash" |
||||
|
import { mixins } from "@/mixins/mixins" |
||||
|
import { LoadingMixins } from "@/mixins/LoadingMixins" |
||||
|
import { filterSelectMixins } from '@/mixins/filter-Select' |
||||
|
export default { |
||||
|
mixins: [ |
||||
|
mixins, |
||||
|
LoadingMixins, |
||||
|
filterSelectMixins |
||||
|
], |
||||
|
components: { |
||||
|
currenForm, |
||||
|
StepsFormAlone, |
||||
|
currenTableFlex, |
||||
|
resultStatus, |
||||
|
}, |
||||
|
name: "RecycledMaterialsLabel", |
||||
|
data () { |
||||
|
let _this = this |
||||
|
return { |
||||
|
pageLoading:false, |
||||
|
// 步骤条options |
||||
|
stepArray:[ |
||||
|
{title:"信息筛选",next:()=>{return _this.firstNext()}}, |
||||
|
{title:"预览信息",cancle:()=>{return _this.sencondPre()}}, |
||||
|
{title:"打印"}, |
||||
|
], |
||||
|
selectItemInfo:{},//已选物品信息 |
||||
|
selectSupplierInfo:{},//已选物品信息对应的供应商信息 |
||||
|
// 默认筛选数据 |
||||
|
defaultSelectData:{ |
||||
|
itemCode:"", |
||||
|
itemName:"", |
||||
|
// packQty:"", |
||||
|
qty:"", |
||||
|
lot:"", |
||||
|
labelQty:"", |
||||
|
supplierCode:"", |
||||
|
remark:"", |
||||
|
canBuy:null,//采购件 |
||||
|
canMake:null,//制造件 |
||||
|
isRecycled:null,//回收件 |
||||
|
canOutsourcing:null,//外包件 |
||||
|
labelType:null,//标签类型 采购标签/生产标签 |
||||
|
}, |
||||
|
// 筛选数据 |
||||
|
selectData:{}, |
||||
|
// 筛选条件 |
||||
|
selectForm:[ |
||||
|
{ |
||||
|
type: "filterSelect", label: "物品代码", prop: "itemCode", optionsLabel: "name", optionsValue: "code", clearable:true, |
||||
|
focus: (type,val) => { return this.getFilterList(type, val, "basedata/item-basic", |
||||
|
// [{logic:"And",column:"canMake",action:"!=",value:"true"}] //原回收料的条件 |
||||
|
)}, |
||||
|
searchButton: (val) => { this.showSerarchPage(val, 'basedata/Item-Basic', 'ItemBasic', '物品代码', this.selectData, |
||||
|
// [{logic:"And",column:"canMake",action:"!=",value:"true"}] //原回收料的条件 |
||||
|
)}, |
||||
|
colSpan: 12, |
||||
|
}, |
||||
|
{ type: "input",disabled:true,label: "物品名称", prop: "itemName", colSpan: 12 }, |
||||
|
{ type: "select",disabled:true, label: "制造件", prop: "canMake", options: "whetherOrNot", colSpan: 12 }, |
||||
|
{ type: "select", disabled:true,label: "采购件", prop: "canBuy", options: "whetherOrNot", colSpan: 12 }, |
||||
|
{ type: "select", disabled:true,label: "回收件", prop: "isRecycled", options: "whetherOrNot", colSpan: 12 }, |
||||
|
{ type: "select", disabled:true,label: "外包件", prop: "canOutsourcing", options: "whetherOrNot", colSpan: 12 }, |
||||
|
// { type: "input",disabled:true,label: "标包数量", prop: "packQty", colSpan: 12 }, |
||||
|
{ type: "inputNumber", label: "实际数量", prop: "qty",colSpan: 12 }, |
||||
|
{ type: "input", label: "批次", prop: "lot", colSpan: 12 }, |
||||
|
{ type: "inputNumber", label: "标签个数", prop: "labelQty", min:1,colSpan: 12 }, |
||||
|
{ type: "filterSelect", label: "供应商代码", prop: "supplierCode", optionsLabel: "supplierSimpleName", optionsValue: "supplierCode", clearable:true, |
||||
|
beforeFocus:()=>{if(!this.selectData.itemCode || this.selectData.itemCode.length <= 0){this.$message.error('请输入物品代码'); return false}else{return true}}, |
||||
|
focus: (type,val) => { return this.getFilterList(type, val, "basedata/supplier-item",this.isFilter("itemCode", this.selectData.itemCode))}, |
||||
|
searchButton: (val) => { this.showSerarchPage(val, 'basedata/supplier-item', 'SupplierItem', '供应商代码', this.selectData, |
||||
|
this.isFilter("itemCode", this.selectData.itemCode) |
||||
|
) }, |
||||
|
colSpan: 12, |
||||
|
}, |
||||
|
{ type: "input", label: "备注", prop: "remark", colSpan: 12 }, |
||||
|
], |
||||
|
// 筛选Rules |
||||
|
selectRules:{ |
||||
|
itemCode: [{ required: true, trigger: "change", message: "物品代码不能为空" },], |
||||
|
// lot: [{ required: true, trigger: "change", message: "批次不能为空" }], |
||||
|
qty: [{ required: true, trigger: "change", message: "实际数量不能为空" }], |
||||
|
labelQty: [{ required: true, trigger: "change", message: "标签个数不能为空" }], |
||||
|
}, |
||||
|
// 表格头部信息 |
||||
|
flexTableColumns:[ |
||||
|
{ label: "物品代码", prop: "itemCode", }, |
||||
|
{ label: "物品名称", prop: "itemName", }, |
||||
|
{ label: "批次", prop: "lot", }, |
||||
|
// { width:"auto",label: "标包数量", prop: "packQty", }, |
||||
|
// { width:"auto",label: "标包单位", prop: "packUom", }, |
||||
|
{ label: "实际数量", prop: "qty", }, |
||||
|
{ label: "供应商代码", prop: "supplierCode", }, |
||||
|
{ label: "供应商简称", prop: "supplierSimpleName", }, |
||||
|
{ width:"auto",label: "供应商零件号", prop: "supplierItemCode", }, |
||||
|
{ width:"auto",label: "供应商零件名", prop: "supplierItemName", }, |
||||
|
{ width:"auto",label: "备注", prop: "remark", }, |
||||
|
{ width:"auto",label: "生产日期", prop: "produceDate",type: "dateTime" }, |
||||
|
{ width:"auto",label: "箱标签", prop: "packingCode",fixed:"right" }, |
||||
|
], |
||||
|
// 已选数据信息 |
||||
|
flexSelectTableData:[], |
||||
|
canTypeShow:false,//制造件/采购件选择弹窗 |
||||
|
canTypeTitle:"",//制造件/采购件选择弹窗提示 |
||||
|
canForm:{ |
||||
|
canType:null |
||||
|
},//制造件/采购件选择数据 |
||||
|
canRules:{ |
||||
|
canType: [{ required: true, trigger: "change", message: "请选择类型" }], |
||||
|
}, |
||||
|
}; |
||||
|
}, |
||||
|
created(){ |
||||
|
this.selectData = this.defaultSelectData |
||||
|
}, |
||||
|
methods: { |
||||
|
// 返回 |
||||
|
rest(){ |
||||
|
this.selectItemInfo={}; |
||||
|
this.selectSupplierInfo = {} |
||||
|
this.selectData = this.defaultSelectData |
||||
|
this.flexSelectTableData = []; |
||||
|
this.$refs.steps_create.returnFirstActive() |
||||
|
this.$refs.form_create.getDom().resetFields(); |
||||
|
}, |
||||
|
// 第一部物品代码点击拉取 |
||||
|
detailsDataPush (val) { |
||||
|
// 点击物品 |
||||
|
if(val[1].prop == "itemCode"){ |
||||
|
this.canForm.canType = null |
||||
|
this.selectItemInfo = val[0]; |
||||
|
this.selectData.itemName = this.selectItemInfo.name |
||||
|
this.selectData.canBuy=this.selectItemInfo.canBuy; |
||||
|
this.selectData.canMake=this.selectItemInfo.canMake; |
||||
|
this.selectData.isRecycled=this.selectItemInfo.isRecycled; |
||||
|
this.selectData.canOutsourcing=this.selectItemInfo.canOutsourcing; |
||||
|
this.selectData.supplierCode = "" |
||||
|
// this.pageLoading = true |
||||
|
// let params = { |
||||
|
// condition: { |
||||
|
// filters: [] |
||||
|
// } |
||||
|
// } |
||||
|
// params.condition.filters.push(...this.isFilter("itemCode", this.selectData.itemCode)) |
||||
|
// getPageList(params, "basedata/item-pack") |
||||
|
// .then(res => { |
||||
|
// if (res.items.length > 0) { |
||||
|
// this.selectItemInfo = res.items[0]; |
||||
|
// // this.selectItemInfo.itemCode = selectData.itemCode |
||||
|
// // this.selectItemInfo.itemName = val[0].name |
||||
|
// } |
||||
|
// getDetailed(val[0].id, "basedata/item-basic").then(res => { |
||||
|
// this.pageLoading = false |
||||
|
// this.selectItemInfo = Object.assign(this.selectItemInfo,res); |
||||
|
// this.selectData.itemName=this.selectItemInfo.name; |
||||
|
// this.selectData.packQty=this.selectItemInfo.packQty || ""; |
||||
|
// }) |
||||
|
// .catch(err => { |
||||
|
// this.pageLoading = false |
||||
|
// }) |
||||
|
// }) |
||||
|
// .catch(err => { |
||||
|
// this.pageLoading = false |
||||
|
// }) |
||||
|
|
||||
|
} |
||||
|
// 点击供应商 |
||||
|
if(val[1].prop == "supplierCode"){ |
||||
|
this.selectSupplierInfo = val[0]; |
||||
|
this.selectData.supplierCode = this.selectSupplierInfo.supplierCode |
||||
|
} |
||||
|
}, |
||||
|
// 制造件/采购件选择--操作 |
||||
|
canSelectHandle(val){ |
||||
|
// 取消 |
||||
|
if(val == '0'){ |
||||
|
this.canTypeShow = false |
||||
|
this.canForm.canType = null |
||||
|
} |
||||
|
// 确定 |
||||
|
else{ |
||||
|
this.$refs['form_canType'].validate(valid=>{ |
||||
|
if(valid){ |
||||
|
this.canTypeShow = false |
||||
|
document.getElementsByClassName("stepsAloneBtn-next")[0].click() |
||||
|
} |
||||
|
}) |
||||
|
} |
||||
|
}, |
||||
|
// 第一步骤下一步操作 |
||||
|
firstNext(){ |
||||
|
return new Promise((resolve,reject) => { |
||||
|
this.$refs['form_create'].getDom().validate(valid=>{ |
||||
|
if(valid){ |
||||
|
// 采购件/制造件全都是 |
||||
|
if(this.selectItemInfo.canBuy && this.selectItemInfo.canMake && this.canForm.canType == null){ |
||||
|
this.canForm.canType = null |
||||
|
this.canTypeShow = true |
||||
|
this.canTypeTitle = `【${this.selectData.itemCode}】即是采购件,也是制造件,请选择生成标签的类型` |
||||
|
reject() |
||||
|
return |
||||
|
} |
||||
|
// 采购件/制造件全都否 |
||||
|
if(!this.selectItemInfo.canBuy && !this.selectItemInfo.canMake && this.canForm.canType == null){ |
||||
|
this.canForm.canType = null |
||||
|
this.canTypeShow = true |
||||
|
this.canTypeTitle = `【${this.selectData.itemCode}】即不是采购件,也不是制造件,请选择生成标签的类型` |
||||
|
reject() |
||||
|
return |
||||
|
} |
||||
|
// 采购件、制造件只有一个为true |
||||
|
if((this.selectItemInfo.canBuy && !this.selectItemInfo.canMake) || (!this.selectItemInfo.canBuy && this.selectItemInfo.canMake)){ |
||||
|
this.canForm.canType = this.selectItemInfo.canBuy ? "1" : "2"; |
||||
|
} |
||||
|
// console.log(this.selectItemInfo)//basedata/item-basic/list |
||||
|
// console.log(this.selectData) |
||||
|
// console.log(this.selectSupplierInfo)//basedata/supplier-item/list |
||||
|
let _data = { |
||||
|
fullBarcodeString: undefined,//获取不到 |
||||
|
itemCode: this.selectData.itemCode || null, |
||||
|
itemName: this.selectItemInfo.name || null, |
||||
|
itemDesc1: this.selectItemInfo.desc1 || null, |
||||
|
itemDesc2: this.selectItemInfo.desc2 || null, |
||||
|
lot: this.selectData.lot || "", |
||||
|
supplierBatch: undefined,//获取不到 |
||||
|
arriveDate: undefined,//获取不到 |
||||
|
produceDate: undefined,//获取不到 |
||||
|
expireDate: undefined,//获取不到 |
||||
|
stdPackQty: Number(this.selectItemInfo.stdPackQty) || 0, |
||||
|
uom: this.selectItemInfo.basicUom || "", |
||||
|
qty: Number(this.selectData.qty), |
||||
|
labelStatus: undefined,//获取不到 |
||||
|
recommendLocationCode: undefined,//获取不到 |
||||
|
locationErpCode: undefined,//获取不到 |
||||
|
containerCode: undefined,//获取不到 |
||||
|
supplierCode: this.selectData.supplierCode || null, |
||||
|
poNumber: undefined,//获取不到 |
||||
|
rpNumber: undefined,//获取不到 |
||||
|
asnNumber: undefined,//获取不到 |
||||
|
qLevel: undefined,//获取不到 |
||||
|
qualityFile: undefined,//获取不到 |
||||
|
prodLine: undefined,//获取不到 |
||||
|
team: undefined,//获取不到 |
||||
|
shift: undefined,//获取不到 |
||||
|
specifications: this.selectItemInfo.color || null, |
||||
|
supplierName: this.selectSupplierInfo.supplierName || undefined,//获取不到 |
||||
|
supplierSimpleName: this.selectSupplierInfo.supplierSimpleName || null, |
||||
|
supplierItemCode: this.selectSupplierInfo.supplierItemCode || null, |
||||
|
supplierItemName: this.selectSupplierInfo.itemName || null, |
||||
|
labelType: Number(this.canForm.canType), |
||||
|
planArriveDate: undefined,//获取不到 |
||||
|
remark:this.selectData.remark,//接口缺少 |
||||
|
} |
||||
|
// let _data = JSON.parse(JSON.stringify(this.selectItemInfo)) |
||||
|
// delete _data.concurrencyStamp; |
||||
|
// delete _data.company; |
||||
|
// delete _data.id; |
||||
|
// delete _data.lastModificationTime; |
||||
|
// delete _data.lastModifierId; |
||||
|
// delete _data.creationTime; |
||||
|
// delete _data.creatorId; |
||||
|
// _data.itemCode=this.selectData.itemCode, |
||||
|
// _data.itemName= this.selectData.itemName, |
||||
|
// _data.stdPackQty= Number(this.selectData.packQty) || 0, |
||||
|
// _data.lot=this.selectData.lot || "", |
||||
|
// _data.qty=Number(this.selectData.qty), |
||||
|
// _data.remark=this.selectData.remark, |
||||
|
// // _data.uom= this.selectItemInfo.packUom || "", |
||||
|
// _data.uom= this.selectItemInfo.basicUom || "", |
||||
|
// _data.itemDesc1= this.selectItemInfo.desc1 || "", |
||||
|
// _data.itemDesc2= this.selectItemInfo.desc2 || "", |
||||
|
// _data.labelType= Number(this.canForm.canType), |
||||
|
// _data.company= localStorage.getItem("company"), |
||||
|
// // 选择供应商传递相对信息 |
||||
|
// _data.supplierCode = this.selectData.supplierCode || "", |
||||
|
// _data.supplierName = this.selectSupplierInfo.supplierName || "", |
||||
|
// _data.supplierSimpleName = this.selectSupplierInfo.supplierSimpleName || "", |
||||
|
// _data.supplierItemCode = this.selectSupplierInfo.supplierItemCode || "", |
||||
|
// _data.supplierItemName = this.selectSupplierInfo.supplierItemName || this.selectSupplierInfo.itemName || "", |
||||
|
// _data.supplierPackQty = this.selectSupplierInfo.supplierPackQty || "", |
||||
|
// _data.supplierPackUom = this.selectSupplierInfo.supplierPackUom || "", |
||||
|
// 生成标签(接口) |
||||
|
this.pageLoading = true; |
||||
|
postInventoryLabelCode_count({count:this.selectData.labelQty}, _data) |
||||
|
.then(res => { |
||||
|
this.canForm.canType = null |
||||
|
this.pageLoading = false |
||||
|
this.flexSelectTableData = res |
||||
|
this.flexSelectTableData.forEach(item=>{ |
||||
|
item.packingCode=item.code |
||||
|
// item.itemName=this.selectData.itemName |
||||
|
// item.packQty=this.selectData.packQty |
||||
|
// item.packUom=this.selectItemInfo.basicUom |
||||
|
}) |
||||
|
resolve() |
||||
|
}) |
||||
|
.catch(err => { |
||||
|
this.pageLoading = false |
||||
|
reject() |
||||
|
}) |
||||
|
} |
||||
|
}) |
||||
|
}) |
||||
|
}, |
||||
|
// 第二步返回 |
||||
|
sencondPre(){ |
||||
|
return new Promise((resolve,reject) => { |
||||
|
this.canForm.canType = null |
||||
|
resolve() |
||||
|
}) |
||||
|
}, |
||||
|
// 打印 |
||||
|
printHandle(){ |
||||
|
// let _printData = { |
||||
|
// // supplierCode:this.selectData.supplierCode || "", |
||||
|
// // supplierSimpleName:this.selectSupplierInfo.supplierSimpleName || "", |
||||
|
// details:[] |
||||
|
// } |
||||
|
let _printData = this.flexSelectTableData[0] |
||||
|
_printData.details = [] |
||||
|
this.flexSelectTableData.forEach(item=>{ |
||||
|
_printData.details.push(item) |
||||
|
}) |
||||
|
_printData.title = "标签" |
||||
|
this.Print(initPrintPackingCodeManyData(_printData)) |
||||
|
}, |
||||
|
//过滤查询条件 |
||||
|
isFilter (val, data) { |
||||
|
let filter = [ |
||||
|
{ |
||||
|
logic: "And", |
||||
|
column: val, |
||||
|
action: "==", |
||||
|
value: data |
||||
|
} |
||||
|
] |
||||
|
return filter |
||||
|
}, |
||||
|
}, |
||||
|
} |
||||
|
</script> |
@ -0,0 +1,352 @@ |
|||||
|
<template> |
||||
|
<div class="appMainPage" v-loading="pageLoading"> |
||||
|
<!-- 标签管理-业务标签-生产退库标签 --> |
||||
|
<StepsFormAlone |
||||
|
:stepArray="stepArray" |
||||
|
ref="steps_sctk" |
||||
|
:hideLastBtsn="true" |
||||
|
> |
||||
|
<template v-slot:stepSlot1> |
||||
|
<curren-Form |
||||
|
ref="form_sctk" |
||||
|
size="medium" |
||||
|
:searchData="selectData" |
||||
|
:searchForm="selectForm" |
||||
|
:rules="selectRules" |
||||
|
:searchOptions="editOptions" |
||||
|
@push="detailsDataPush(arguments)" |
||||
|
@clear="filterClearHandle(arguments)" |
||||
|
></curren-Form> |
||||
|
</template> |
||||
|
<template v-slot:stepSlot2> |
||||
|
<currenTableFlex |
||||
|
:flexTableData="flexSelectTableData" |
||||
|
:flexSearchOptions="editOptions" |
||||
|
:flexTableColumns="flexTableColumns" |
||||
|
:showAddBtn="false" |
||||
|
:showAllDeleteButton="false" |
||||
|
:isShowIndex="true" |
||||
|
></currenTableFlex> |
||||
|
</template> |
||||
|
<template v-slot:stepSlot3> |
||||
|
<!-- 结果 --> |
||||
|
<resultStatus> |
||||
|
<template> |
||||
|
<el-button @click="rest()">返回</el-button> |
||||
|
<el-button type="primary" @click="printHandle()">打印</el-button> |
||||
|
</template> |
||||
|
</resultStatus> |
||||
|
</template> |
||||
|
</StepsFormAlone> |
||||
|
<!-- 搜索按钮——窗体组件 --> |
||||
|
<searchPage |
||||
|
ref="searchTable" |
||||
|
:tableLoading="Loading.autoTableLoading" |
||||
|
:advancedFilter="advancedFilter()" |
||||
|
:filterPageListParams="filterPageListParams" |
||||
|
:formTitle="searchTitle" |
||||
|
:displayDialog="displayDialog.AddNewDialog" |
||||
|
:searchTableData="searchData" |
||||
|
:searchTableColumns="searchColumns" |
||||
|
:searchTotalCount="searchTotalCount" |
||||
|
:supplierItemPage="searchPageListParams" |
||||
|
@handleSelectionChange="prepareFormData" |
||||
|
@SizeChange="searchAlterResultCount($event, searchPageListParams)" |
||||
|
@CurrentChange="searchAlertoldSkipCount($event, searchPageListParams)" |
||||
|
@tableButtonClick="searchSubmit(arguments)" |
||||
|
></searchPage> |
||||
|
</div> |
||||
|
</template> |
||||
|
<script> |
||||
|
import { postInventoryLabelCode_count } from "@/api/wms-core" |
||||
|
import currenForm from "@/components/currenForm" |
||||
|
import StepsFormAlone from "@/components/StepsFormAlone" |
||||
|
import resultStatus from "@/components/resultStatus" |
||||
|
import currenTableFlex from "@/components/currenTableFlex" |
||||
|
import {initPrintPackingCodeManyData} from "@/mixins/printMixin" |
||||
|
import { getPageList,getDetailed, getPage} from "@/api/wms-api" |
||||
|
import _ from "lodash" |
||||
|
import { mixins } from "@/mixins/mixins" |
||||
|
import { LoadingMixins } from "@/mixins/LoadingMixins" |
||||
|
import { filterSelectMixins } from '@/mixins/filter-Select' |
||||
|
export default { |
||||
|
mixins: [ |
||||
|
mixins, |
||||
|
LoadingMixins, |
||||
|
filterSelectMixins |
||||
|
], |
||||
|
components: { |
||||
|
currenForm, |
||||
|
StepsFormAlone, |
||||
|
currenTableFlex, |
||||
|
resultStatus, |
||||
|
}, |
||||
|
name: "productionReturnLabel", |
||||
|
data () { |
||||
|
let _this = this |
||||
|
return { |
||||
|
pageLoading:false, |
||||
|
// 步骤条options |
||||
|
stepArray:[ |
||||
|
{title:"信息筛选",next:()=>{return _this.firstNext()}}, |
||||
|
{title:"预览信息"}, |
||||
|
{title:"打印"}, |
||||
|
], |
||||
|
itemPackInfo:{},//已选物品信息包装信息 |
||||
|
poNumberInfo:{},//订单号相关信息 |
||||
|
selectItemInfo:{},//已选物品信息 |
||||
|
selectSupplierInfo:{},//供应商相对信息 |
||||
|
// 筛选数据 |
||||
|
selectData:{ |
||||
|
itemCode:"", |
||||
|
itemName:"", |
||||
|
packQty:"", |
||||
|
qty:"", |
||||
|
lot:"", |
||||
|
labelQty:"", |
||||
|
supplierCode:"", |
||||
|
supplierName:"", |
||||
|
poNumber:"", |
||||
|
}, |
||||
|
// 筛选条件 |
||||
|
selectForm:[ |
||||
|
{ type: "filterSelect", label: "物品代码", prop: "itemCode", optionsLabel: "name", optionsValue: "code", clearable:true, |
||||
|
focus: (type,val) => { return this.getFilterList(type, val, "basedata/item-basic",[ |
||||
|
{logic:"And",column:"canMake",action:"!=",value:"true"}, |
||||
|
{logic:"And",column:"isRecycled",action:"!=",value:"true"}, |
||||
|
])}, |
||||
|
searchButton: (val) => { this.showSerarchPage(val, 'basedata/Item-Basic', 'ItemBasic', '物品代码', this.selectData,[ |
||||
|
{logic:"And",column:"canMake",action:"!=",value:"true"}, |
||||
|
{logic:"And",column:"isRecycled",action:"!=",value:"true"}, |
||||
|
]) }, |
||||
|
colSpan: 12, |
||||
|
}, |
||||
|
{ type: "input",disabled:true,label: "物品名称", prop: "itemName", colSpan: 12 }, |
||||
|
{ type: "filterSelect", label: "供应商代码", prop: "supplierCode", optionsLabel: "supplierSimpleName", optionsValue: "supplierCode", clearable:true, |
||||
|
beforeFocus:()=>{if(!this.selectData.itemCode || this.selectData.itemCode.length <= 0){this.$message.error('请输入物品代码'); return false}else{return true}}, |
||||
|
focus: (type,val) => { return this.getFilterList(type, val, "basedata/supplier-item",this.isFilter("itemCode", this.selectData.itemCode))}, |
||||
|
searchButton: (val) => { this.showSerarchPage(val, 'basedata/supplier-item', 'SupplierItem', '供应商代码', this.selectData, |
||||
|
this.isFilter("itemCode", this.selectData.itemCode) |
||||
|
) }, |
||||
|
colSpan: 12, |
||||
|
}, |
||||
|
{ |
||||
|
type: "filterSelect", label: "采购订单号", prop: "poNumber",optionsValue: "poNumber", clearable:true,getType:"getPage", |
||||
|
beforeFocus:()=>{if(!this.selectData.itemCode || this.selectData.itemCode.length <= 0){this.$message.error('请输入物品代码'); return false}else{return true}}, |
||||
|
focus: (type,val) => { return this.getFilterList(type, {itemCode:this.selectData.itemCode}, "wms/store/supplier-asn/get-list-by-item-code")}, |
||||
|
colSpan: 12, |
||||
|
}, |
||||
|
{ type: "input",disabled:true,label: "标包数量", prop: "packQty", colSpan: 12 }, |
||||
|
{ type: "inputNumber", label: "实际数量", prop: "qty",colSpan: 12 }, |
||||
|
{ type: "input", label: "批次", prop: "lot", colSpan: 12 }, |
||||
|
{ type: "inputNumber", label: "标签个数", prop: "labelQty", min:1,colSpan: 12 }, |
||||
|
], |
||||
|
// 筛选Rules |
||||
|
selectRules:{ |
||||
|
itemCode: [{ required: true, trigger: "change", message: "物品代码不能为空" }], |
||||
|
supplierCode: [{ required: true, trigger: "change", message: "供应商代码不能为空" }], |
||||
|
poNumber: [{ required: true, trigger: "change", message: "采购订单号不能为空" }], |
||||
|
lot: [{ required: true, trigger: "change", message: "批次不能为空" }], |
||||
|
qty: [{ required: true, trigger: "change", message: "实际数量不能为空" }], |
||||
|
labelQty: [{ required: true, trigger: "change", message: "标签个数不能为空" }], |
||||
|
}, |
||||
|
// 格头部信息 |
||||
|
flexTableColumns:[ |
||||
|
{ width:"auto",label: "物品代码", prop: "itemCode", }, |
||||
|
{ width:"auto",label: "物品名称", prop: "itemName", }, |
||||
|
{ width:"auto",label: "批次", prop: "lot", }, |
||||
|
{ width:"auto",label: "订单号", prop: "poNumber", }, |
||||
|
{ width:"auto",label: "供应商代码", prop: "supplierCode", }, |
||||
|
{ width:"auto",label: "供应商名称", prop: "supplierSimpleName", }, |
||||
|
{ width:"auto",label: "标包数量", prop: "packQty", }, |
||||
|
{ width:"auto",label: "标包单位", prop: "packUom", }, |
||||
|
{ width:"auto",label: "实际数量", prop: "qty", }, |
||||
|
{ width:"auto",label: "生产日期", prop: "produceDate",type: "dateTime" }, |
||||
|
{ width:"auto",label: "箱标签", prop: "packingCode",fixed:"right" }, |
||||
|
], |
||||
|
// 已选数据信息 |
||||
|
flexSelectTableData:[] |
||||
|
}; |
||||
|
}, |
||||
|
methods: { |
||||
|
// 返回 |
||||
|
rest(){ |
||||
|
this.selectSupplierInfo = {} |
||||
|
this.selectItemInfo={}; |
||||
|
this.itemPackInfo = {} |
||||
|
this.poNumberInfo = {} |
||||
|
this.selectData={ |
||||
|
itemCode:"", |
||||
|
itemName:"", |
||||
|
packQty:"", |
||||
|
qty:"", |
||||
|
lot:"", |
||||
|
labelQty:"", |
||||
|
}; |
||||
|
this.flexSelectTableData = []; |
||||
|
this.$refs.steps_sctk.returnFirstActive() |
||||
|
this.$refs.form_sctk.getDom().resetFields(); |
||||
|
}, |
||||
|
// 第一部点击拉取 |
||||
|
detailsDataPush (val) { |
||||
|
if(val[1].prop == "itemCode"){ |
||||
|
this.pageLoading = true |
||||
|
let params = { |
||||
|
condition: { |
||||
|
filters: [] |
||||
|
} |
||||
|
} |
||||
|
params.condition.filters.push(...this.isFilter("itemCode", this.selectData.itemCode)) |
||||
|
getPageList(params, "basedata/item-pack") |
||||
|
.then(res => { |
||||
|
if (res.items.length > 0) { |
||||
|
this.itemPackInfo = res.items[0] |
||||
|
this.selectData.packQty=res.items[0].qty |
||||
|
// this.selectItemInfo = res.items[0]; |
||||
|
} |
||||
|
getDetailed(val[0].id, "basedata/item-basic").then(res => { |
||||
|
this.pageLoading = false |
||||
|
this.selectItemInfo = Object.assign(this.selectItemInfo,res); |
||||
|
this.selectData.itemName=this.selectItemInfo.name; |
||||
|
// this.selectData.packQty=this.selectItemInfo.packQty || ""; |
||||
|
}) |
||||
|
.catch(err => { |
||||
|
this.pageLoading = false |
||||
|
}) |
||||
|
}) |
||||
|
.catch(err => { |
||||
|
this.pageLoading = false |
||||
|
}) |
||||
|
} |
||||
|
else if (val[1].prop == "supplierCode"){ |
||||
|
this.selectSupplierInfo = val[0] |
||||
|
// this.selectData.supplierName = val[0].supplierName |
||||
|
// this.selectData.supplierSimpleName = val[0].supplierSimpleName |
||||
|
} |
||||
|
// 采购订单 |
||||
|
else if(val[1].prop == "poNumber"){ |
||||
|
this.poNumberInfo = val[0] |
||||
|
// this.selectData.poNumber = val[0].poNumber |
||||
|
} |
||||
|
}, |
||||
|
// 第一部物品代码点击拉取 |
||||
|
filterClearHandle(val){ |
||||
|
if(val[0].prop == "itemCode"){ |
||||
|
this.selectData.supplierCode = "" |
||||
|
this.selectData.poNumber = "" |
||||
|
this.$refs.form_sctk.getDom().resetFields(); |
||||
|
} |
||||
|
}, |
||||
|
// 第一步骤下一步操作 |
||||
|
firstNext(){ |
||||
|
return new Promise((resolve,reject) => { |
||||
|
this.$refs['form_sctk'].getDom().validate(valid=>{ |
||||
|
if(valid){ |
||||
|
let _data = { |
||||
|
fullBarcodeString: undefined,//获取不到 |
||||
|
itemCode: this.selectData.itemCode || null, |
||||
|
itemName: this.selectItemInfo.name || null, |
||||
|
itemDesc1: this.selectItemInfo.desc1 || null, |
||||
|
itemDesc2: this.selectItemInfo.desc2 || null, |
||||
|
lot: this.selectData.lot || "", |
||||
|
supplierBatch: undefined,//获取不到 |
||||
|
arriveDate: undefined,//获取不到 |
||||
|
produceDate: undefined,//获取不到 |
||||
|
expireDate: undefined,//获取不到 |
||||
|
stdPackQty: Number(this.selectItemInfo.stdPackQty) || 0, |
||||
|
uom: this.selectItemInfo.basicUom || "", |
||||
|
qty: Number(this.selectData.qty), |
||||
|
labelStatus: undefined,//获取不到 |
||||
|
recommendLocationCode: undefined,//获取不到 |
||||
|
locationErpCode: undefined,//获取不到 |
||||
|
containerCode: undefined,//获取不到 |
||||
|
supplierCode: this.selectData.supplierCode || null, |
||||
|
poNumber: this.selectData.poNumber, |
||||
|
rpNumber: undefined,//获取不到 |
||||
|
asnNumber: undefined,//获取不到 |
||||
|
qLevel: undefined,//获取不到 |
||||
|
qualityFile: undefined,//获取不到 |
||||
|
prodLine: undefined,//获取不到 |
||||
|
team: undefined,//获取不到 |
||||
|
shift: undefined,//获取不到 |
||||
|
specifications: this.selectItemInfo.color || null, |
||||
|
supplierName: this.selectSupplierInfo.supplierName || undefined,//获取不到 |
||||
|
supplierSimpleName: this.selectSupplierInfo.supplierSimpleName || null, |
||||
|
supplierItemCode: this.selectSupplierInfo.supplierItemCode || null, |
||||
|
supplierItemName: this.selectSupplierInfo.itemName || null, |
||||
|
labelType: 1, |
||||
|
planArriveDate: undefined,//获取不到 |
||||
|
} |
||||
|
// let _data = this.selectItemInfo |
||||
|
// _data.itemCode=this.selectData.itemCode, |
||||
|
// _data.itemName= this.selectData.itemName, |
||||
|
// _data.stdPackQty= Number(this.selectData.packQty) || 0, |
||||
|
// _data.lot=this.selectData.lot, |
||||
|
// _data.qty=Number(this.selectData.qty), |
||||
|
// _data.uom= this.selectItemInfo.packUom || "", |
||||
|
// _data.itemDesc1= this.selectItemInfo.desc1 || "", |
||||
|
// _data.itemDesc2= this.selectItemInfo.desc2 || "", |
||||
|
// _data.poNumber= this.selectData.poNumber, |
||||
|
// _data.labelType= 1, |
||||
|
// _data.company= localStorage.getItem("company"), |
||||
|
// 生成标签(接口) |
||||
|
this.pageLoading = true; |
||||
|
postInventoryLabelCode_count({count:this.selectData.labelQty}, _data) |
||||
|
.then(res => { |
||||
|
this.pageLoading = false |
||||
|
this.flexSelectTableData = res |
||||
|
this.flexSelectTableData.forEach(item=>{ |
||||
|
item.packingCode=item.code |
||||
|
// item.itemName=this.selectData.itemName |
||||
|
item.packQty=this.itemPackInfo.qty |
||||
|
item.packUom=this.itemPackInfo.basicUom |
||||
|
// item.packQty=this.selectData.packQty |
||||
|
// item.packUom=this.selectItemInfo.packUom |
||||
|
// item.supplierName=this.selectData.supplierName |
||||
|
// item.supplierCode=this.selectData.supplierCode |
||||
|
// item.poNumber=this.selectData.poNumber |
||||
|
}) |
||||
|
resolve() |
||||
|
}) |
||||
|
.catch(err => { |
||||
|
this.pageLoading = false |
||||
|
reject() |
||||
|
}) |
||||
|
} |
||||
|
}) |
||||
|
}) |
||||
|
}, |
||||
|
// 打印 |
||||
|
printHandle(){ |
||||
|
// let _printData = { |
||||
|
// poNumber:this.selectData.poNumber, |
||||
|
// asnNumber:this.flexSelectTableData[0].asnNumber, |
||||
|
// supplierCode:this.flexSelectTableData[0].supplierCode, |
||||
|
// supplierName:this.flexSelectTableData[0].supplierName, |
||||
|
// supplierSimpleName:this.flexSelectTableData[0].supplierName, |
||||
|
// details:[] |
||||
|
// } |
||||
|
let _printData = this.flexSelectTableData[0] |
||||
|
_printData.details = [] |
||||
|
this.flexSelectTableData.forEach(item=>{ |
||||
|
_printData.details.push(JSON.parse(JSON.stringify(item))) |
||||
|
}) |
||||
|
_printData.title = "生产退库标签" |
||||
|
|
||||
|
this.Print(initPrintPackingCodeManyData(_printData)) |
||||
|
}, |
||||
|
//过滤查询条件 |
||||
|
isFilter (val, data) { |
||||
|
let filter = [ |
||||
|
{ |
||||
|
logic: "And", |
||||
|
column: val, |
||||
|
action: "==", |
||||
|
value: data |
||||
|
} |
||||
|
] |
||||
|
return filter |
||||
|
}, |
||||
|
}, |
||||
|
} |
||||
|
</script> |
Loading…
Reference in new issue