Browse Source

【nev-pc】回收料等暂存

ag_report_nev
安虹睿 1 year ago
parent
commit
be39016e1a
  1. 2
      fe/PC/src/api/wms-core.js
  2. 1
      fe/PC/src/components/currenTable/index.vue
  3. 26
      fe/PC/src/components/filterSelect/index.vue
  4. 8
      fe/PC/src/mixins/filter-Select.js
  5. 16
      fe/PC/src/router/index.js
  6. 44
      fe/PC/src/utils/detailsTableColumns/index.js
  7. 11
      fe/PC/src/utils/formatTime.js
  8. 33
      fe/PC/src/utils/tableColumns/index.js
  9. 29
      fe/PC/src/utils/tabsDesTions/index.js
  10. 18
      fe/PC/src/views/basicData/WorkshopManage/ProductionLine.vue
  11. 321
      fe/PC/src/views/inventoryManage/recycledMaterials/materialsAdjustmentFunc.vue
  12. 163
      fe/PC/src/views/rawMaterialManage/purchaseReceipt/PurchaseOrderHigher.vue

2
fe/PC/src/api/wms-core.js

@ -29,7 +29,7 @@ export function postInventoryLabelCode(data) {
} }
//生产、采购生成标签(一次多个)| 标签管理模块 //生产、采购生成标签(一次多个)| 标签管理模块
export function postInventoryLabelCode_count(params,data) { export async function postInventoryLabelCode_count(params,data) {
return request({ return request({
url: baseURL + 'label/inventory-label/generate-and-create/many/'+params.count, url: baseURL + 'label/inventory-label/generate-and-create/many/'+params.count,
method: 'post', method: 'post',

1
fe/PC/src/components/currenTable/index.vue

@ -148,6 +148,7 @@
v-if="item.type === 'filterSelect'" v-if="item.type === 'filterSelect'"
:selectModel="scope.row[item.prop]" :selectModel="scope.row[item.prop]"
:selectItem="item" :selectItem="item"
:tableScope="scope"
@filterOptionSelectHandle="(item,props,val)=>{filterOptionSelectHandle(item,props,val,scope)}" @filterOptionSelectHandle="(item,props,val)=>{filterOptionSelectHandle(item,props,val,scope)}"
@filterClearHandle="(item)=>{filterClearHandle(item,scope)}" @filterClearHandle="(item)=>{filterClearHandle(item,scope)}"
></filterSelect> ></filterSelect>

26
fe/PC/src/components/filterSelect/index.vue

@ -55,8 +55,8 @@ export default {
props: { props: {
// //
selectModel: { selectModel: {
type: String, type: String | Array ,
default: "" default: null
}, },
// //
selectItem: { selectItem: {
@ -65,6 +65,13 @@ export default {
return {} return {}
} }
}, },
// table
tableScope:{
type: Object,
default: () => {
return {}
}
}
}, },
data () { data () {
return { return {
@ -81,7 +88,7 @@ export default {
}, },
created () { created () {
if(this.selectItem){ if(this.selectItem){
this.value = this.selectModel this.value = JSON.parse(JSON.stringify(this.selectModel))
this.options = this.selectItem.options this.options = this.selectItem.options
this.isRemoteReset() this.isRemoteReset()
} }
@ -105,7 +112,7 @@ export default {
}, },
// focus // focus
getHttpData(query){ getHttpData(query){
if(this.selectItem.beforeFocus && !this.selectItem.beforeFocus()){ if(this.selectItem.beforeFocus && !this.selectItem.beforeFocus(this.tableScope)){
return return
} }
if(this.selectItem.focus){ if(this.selectItem.focus){
@ -125,12 +132,19 @@ export default {
} }
if(_value.length > 0 && !this.selectItem.noFilter){ if(_value.length > 0 && !this.selectItem.noFilter){
let _column = this.selectItem.optionsValue || this.selectItem.prop let _column = this.selectItem.optionsValue || this.selectItem.prop
_params.condition.filters.push({logic:"And",column:_column,action:"Like",value:_value}) //
if(typeof _value == 'string'){
_params.condition.filters.push({logic:"And",column:_column,action:"Like",value:_value})
}
//
// else{
// _params.condition.filters.push({logic:"And",column:_column,action:"In",value:JSON.stringify(_value)})
// }
} }
} }
// apigetPagegetFilterList val // apigetPagegetFilterList val
// //
this.selectItem.focus(this.selectItem.getType,_params) this.selectItem.focus(this.selectItem.getType,_params,this.tableScope)
.then(res=>{ .then(res=>{
this.options = res this.options = res
if(!res || res.length <= 0){ if(!res || res.length <= 0){

8
fe/PC/src/mixins/filter-Select.js

@ -97,8 +97,12 @@ export const filterSelectMixins = {
// 回显 // 回显
this.$nextTick(() => { this.$nextTick(() => {
if (this.mainData[this.searchFormData.prop]) { if (this.mainData[this.searchFormData.prop]) {
// 针对多选回显处理 // 多选回显处理
let mainDataArry = this.mainData[this.searchFormData.prop].split(',') let mainDataArry = this.mainData[this.searchFormData.prop]
// 单选处理回显处理
if(typeof this.mainData[this.searchFormData.prop] == 'string'){
mainDataArry = this.mainData[this.searchFormData.prop].split(',')
}
mainDataArry.forEach(mainDataArryItem => { mainDataArry.forEach(mainDataArryItem => {
let hxRs = res.items.filter((item => (item[this.searchFormData.optionsValue] == mainDataArryItem))) let hxRs = res.items.filter((item => (item[this.searchFormData.optionsValue] == mainDataArryItem)))
hxRs.forEach(item => { hxRs.forEach(item => {

16
fe/PC/src/router/index.js

@ -174,6 +174,22 @@ export const constantRoutes = [
} }
}] }]
}, },
{
path: '/',
component: Layout,
redirect: '/gridlayout',
hidden: true,
children: [{
path: 'PurchaseOrderHigher',
component: () => import('@/views/rawMaterialManage/purchaseReceipt/PurchaseOrderHigher.vue'),
name: 'PurchaseOrderHigher',
meta: {
keepAlive : true,
title: '采购订单(关闭订单行)',
icon: '系统首页',
}
}]
},
] ]
/** /**

44
fe/PC/src/utils/detailsTableColumns/index.js

@ -108,6 +108,50 @@ export const PurchaseOrder = [
// { label: "主表ID", prop: 'masterID' }, // { label: "主表ID", prop: 'masterID' },
// ************** 确定隐藏 ************************ // ************** 确定隐藏 ************************
] ]
// 采购订单信息 (有关闭订单行)
export const PurchaseOrderHigher = [
{ label: "物品代码", prop: "itemCode", fixed: "left" },
{ label: "物品名称", prop: "itemName" },
{ label: "物品描述1", prop: "itemDesc1" },
{ label: "物品描述2", prop: "itemDesc2" },
{ label: "配置", prop: "item_configurationFromFE" },
{ label: "发货数量", prop: "qty" },
{ label: "物品单位", prop: "uom" },
{ label: "生产批次", prop: "lot" },
{ label: "ERP储位", prop: "locationErpCode" },
{ label: "项目编号", prop: "projectCode" },
{ label: "类型", prop: "ctype", type: "filter", filters: "SupplierAsnCtypeSta" },
{ label: "已发货数量", prop: "shippedQty" },
{ label: "已收货数量", prop: "receivedQty" },
{ label: "已退货数量", prop: "returnedQty" },
{ label: "已上架数量", prop: "putAwayQty" },
// -----------------------------------------------------------------------
{ label: "筹措员代码", prop: 'planUserCode' },
{ label: "要求到货时间", prop: "planArriveDate", type: "dateTime" },
{ label: "过期时间", prop: "expireDate", type: "dateTime" },
{ label: "发货单号", prop: 'number' },
{ label: "上次修改时间", prop: 'lastModificationTime', type: "dateTime" },
{ label: "上次修改者ID", prop: "lastModifierId" },
{ label: "标包数量", prop: 'stdPackQty' },
{ label: "订单行", prop: 'poLine' },
{ label: "供应商包装计量单位", prop: 'supplierPackUom' },
{ label: "供应商包装数量", prop: 'supplierPackQty' },
{ label: "转换率", prop: 'convertRate' },
{ label: "是否寄存订单", prop: 'isConsignment' },
{ label: "备注", prop: 'remark' },
{ label: "订单备注", prop: 'orderRemark' },
{ label: "事务ID", prop: "tenantId" },
{ label: "创建时间", prop: 'creationTime', type: "dateTime" },
{ label: "创建者ID", prop: 'creatorId' },
// { label: "标包计量单位", prop: 'stdPackUom' },
// ************** 确定隐藏 ************************
// { label: "生产时间", prop: "produceDate", type: "dateTime" },
// { label: "lineStatus", prop: 'lineStatus' },
// { label: "ID", prop: 'id' },
// { label: "主表ID", prop: 'masterID' },
// ************** 确定隐藏 ************************
]
// 到货请求 20230404 // 到货请求 20230404
export const PurchaseReceiptRequest = [ export const PurchaseReceiptRequest = [
{ label: "物品代码", prop: "itemCode", fixed: "left" }, { label: "物品代码", prop: "itemCode", fixed: "left" },

11
fe/PC/src/utils/formatTime.js

@ -82,4 +82,15 @@ export function formatTimeStampToNorm(data,type,connect){
default: default:
return year+arr[0] + month+arr[1] + day+arr[2] + " " +hour+arr[3] + minute+arr[4] + second+arr[5]; return year+arr[0] + month+arr[1] + day+arr[2] + " " +hour+arr[3] + minute+arr[4] + second+arr[5];
} }
}
// 获取当前时间
export function getNowInit(type){
return formatTimeStampToNorm(new Date(), type || 'datetime')
}
// 获取当前时间 带T
export function getNowToT(type){
return formatTimeToT(formatTimeStampToNorm(new Date(), type || 'datetime'))
} }

33
fe/PC/src/utils/tableColumns/index.js

@ -1067,6 +1067,39 @@ export const PurchaseOrder = [
// { label: "事务ID", prop: "tenantId" }, // { label: "事务ID", prop: "tenantId" },
// ************** 确认隐藏 ************************ // ************** 确认隐藏 ************************
] ]
// 采购订单信息 (有关闭订单行)
export const PurchaseOrderHigher = [
{
label: "采购订单号",
prop: "number",
fixed: "left",
type: "name",
width: orderWidth
},
{ label: "供应商代码", prop: "supplierCode" },
{ label: "供应商名称", prop: "supplierName" },
{ label: "供应商地址", prop: "supplierAddress",showProp: true },
{ label: "订单备注", prop: 'remark' },
{ label: "创建时间", prop: 'creationTime', type:'dateTime' },
{ label: "操作员", prop: 'worker' },
{ label: "联系人姓名", prop: 'contactName' },
{ label: "联系人电话", prop: 'contactPhone' },
{ label: "联系人邮件", prop: 'contactEmail' },
{ label: "生效日期", prop: 'activeDate', type: "dateTime" },
{ label: "订单类型", prop: 'poType' },
{ label: "是否寄存订单", prop: 'isConsignment', type: "filter", filters: "whetherOrNot" },
{ label: "订单日期", prop: 'orderDate',type: "dateTime" },
{ label: "截止日期", prop: 'dueDate',type: "dateTime" },
{ label: "版本", prop: 'version' },
{ label: "税率", prop: 'taxRate' },
{ label: "上次修改时间", prop: 'lastModificationTime', type: "dateTime" },
// ************** 确认隐藏 ************************
// { label: "orderStatus", prop: 'orderStatus' },
// { label: "上次修改者ID", prop: "lastModifierId" },
// { label: "创建者ID", prop: 'creatorId' },
// { label: "事务ID", prop: "tenantId" },
// ************** 确认隐藏 ************************
]
// 到货请求 20230404 // 到货请求 20230404
export const PurchaseReceiptRequest = [ export const PurchaseReceiptRequest = [
{ {

29
fe/PC/src/utils/tabsDesTions/index.js

@ -807,6 +807,35 @@ export const PurchaseOrder = [
// { label: "orderStatus", prop: 'orderStatus' }, // { label: "orderStatus", prop: 'orderStatus' },
// ************** 确认隐藏 ************************ // ************** 确认隐藏 ************************
] ]
// 采购订单信息 (有关闭订单行)
export const PurchaseOrderHigher = [
{ label: "采购订单号", prop: 'number' },
{ label: "供应商代码", prop: "supplierCode" },
{ label: "供应商名称", prop: "supplierName" },
{ label: "供应商地址", prop: "supplierAddress" },
{ label: "订单备注", prop: 'remark' },
{ label: "创建时间", prop: 'creationTime', type:'dateTime' },
{ label: "创建者ID", prop: "creatorId" },
{ label: "操作员", prop: 'worker' },
{ label: "联系人姓名", prop: 'contactName' },
{ label: "联系人电话", prop: 'contactPhone' },
{ label: "联系人邮件", prop: 'contactEmail' },
{ label: "上次修改时间", prop: 'lastModificationTime', type: "dateTime" },
{ label: "上次修改者ID", prop: "lastModifierId" },
{ label: "生效日期", prop: 'activeDate', type: "dateTime" },
{ label: "事务ID", prop: "tenantId" },
{ label: "订单类型", prop: 'poType' },
{ label: "是否寄存订单", prop: 'isConsignment', type: "filter", filters: "whetherOrNot" },
{ label: "订单日期", prop: 'orderDate',type: "dateTime" },
{ label: "截止日期", prop: 'dueDate',type: "dateTime" },
{ label: "版本", prop: 'version' },
{ label: "税率", prop: 'taxRate' },
// ************** 确认隐藏 ************************
// { label: "ID", prop: 'id' },
// { label: "orderStatus", prop: 'orderStatus' },
// ************** 确认隐藏 ************************
]
// 到货请求 已调整 20230404 // 到货请求 已调整 20230404
export const PurchaseReceiptRequest = [ export const PurchaseReceiptRequest = [
{ label: "到货单号", prop: "number" }, { label: "到货单号", prop: "number" },

18
fe/PC/src/views/basicData/WorkshopManage/ProductionLine.vue

@ -58,6 +58,7 @@
@SizeChange="searchAlterResultCount($event, searchPageListParams)" @SizeChange="searchAlterResultCount($event, searchPageListParams)"
@CurrentChange="searchAlertoldSkipCount($event, searchPageListParams)" @CurrentChange="searchAlertoldSkipCount($event, searchPageListParams)"
@tableButtonClick="searchSubmit(arguments)" @tableButtonClick="searchSubmit(arguments)"
:isMoreSelectTable="true"
></searchPage> ></searchPage>
<!-- 新导入 disabledMethod 导入方式禁用 disabledIsAllowPartImport 是否局部导入禁用--> <!-- 新导入 disabledMethod 导入方式禁用 disabledIsAllowPartImport 是否局部导入禁用-->
<!-- methodValue 导入方式默认选项 是否局部导入 默认选项 --> <!-- methodValue 导入方式默认选项 是否局部导入 默认选项 -->
@ -159,15 +160,14 @@ export default {
{ type: "select", label: "类型", prop: "type", options: "productionLineType", colSpan: 12 }, { type: "select", label: "类型", prop: "type", options: "productionLineType", colSpan: 12 },
{ type: "filterSelect", label: "车间代码", prop: "workshopCode", optionsLabel: "name", optionsValue: "code", { type: "filterSelect", label: "车间代码", prop: "workshopCode", optionsLabel: "name", optionsValue: "code",
focus: (type,val) => { return this.getFilterList(type, val, "basedata/workshop")}, focus: (type,val) => { return this.getFilterList(type, val, "basedata/workshop")},
searchButton: (val) => { this.showSerarchPage(val, 'basedata/workshop', 'Workshop', '车间选择', this.CreateFormData) }, colSpan: 12 }, searchButton: (val) => { this.showSerarchPage(val, 'basedata/workshop', 'Workshop', '车间选择', this.CreateFormData) },
colSpan: 12
{ type: "filterSelect", label: "原料库位", prop: "rawLocationCode", optionsLabel: "name", optionsValue: "code", },
focus: (type,val) => { return this.getFilterList(type, val, "basedata/location",[ { type: "filterSelect", label: "原料库位", prop: "rawLocationCode", optionsLabel: "name", optionsValue: "code",
{logic:"And",column:"type",action:"==",value:"2"}, focus: (type,val) => { return this.getFilterList(type, val, "basedata/location",[{logic:"And",column:"type",action:"==",value:"2"}])},
])}, searchButton: (val) => { this.showSerarchPage(val, 'basedata/location', 'Location', '库位选择', this.CreateFormData,[{logic:"And",column:"type",action:"==",value:"2"},]) },
searchButton: (val) => { this.showSerarchPage(val, 'basedata/location', 'Location', '库位选择', this.CreateFormData,[ colSpan: 12,multiple:true
{logic:"And",column:"type",action:"==",value:"2"}, },
]) }, colSpan: 12 },
{ type: "filterSelect", label: "原料库位组", prop: "rawLocationGroupCode", optionsLabel: "name", optionsValue: "code", { type: "filterSelect", label: "原料库位组", prop: "rawLocationGroupCode", optionsLabel: "name", optionsValue: "code",
focus: (type,val) => { return this.getFilterList(type, val, "basedata/location-group",[ focus: (type,val) => { return this.getFilterList(type, val, "basedata/location-group",[

321
fe/PC/src/views/inventoryManage/recycledMaterials/materialsAdjustmentFunc.vue

@ -77,8 +77,6 @@
:flexSearchOptions="editOptions" :flexSearchOptions="editOptions"
:flexTableColumns="addPopColumns_YL" :flexTableColumns="addPopColumns_YL"
@detailsDataPush="pushYL" @detailsDataPush="pushYL"
@updateSelectListTable="updateSelectListTable_YL"
@changeSelect="changeSelect_YL"
@clearHandle="clearHandle_YL" @clearHandle="clearHandle_YL"
></currenTableFlex> ></currenTableFlex>
</div> </div>
@ -113,6 +111,7 @@ import { filterSelectMixins } from '@/mixins/filter-Select'
import detailsRules from '@/utils/rules'; import detailsRules from '@/utils/rules';
import { getPageList,itemTransformNewCreate } from "@/api/wms-api" import { getPageList,itemTransformNewCreate } from "@/api/wms-api"
import { postInventoryLabelCode_count } from "@/api/wms-core" import { postInventoryLabelCode_count } from "@/api/wms-core"
import { getNowToT,formatTimeStampToNorm } from '@/utils/formatTime'
import store from '@/store' import store from '@/store'
export default { export default {
name: "materialsAdjustmentFunc", name: "materialsAdjustmentFunc",
@ -127,16 +126,6 @@ export default {
components:{ components:{
currenTableFlex currenTableFlex
}, },
watch: {
'packingsYL_Options':{
handler(val) {
console.log(128,val)
this.addPopColumns_YL[1].userOptions = val;
},
deep: true,
immediate: true,
},
},
data () { data () {
return { return {
URL: 'wms/store/item-transform-request', URL: 'wms/store/item-transform-request',
@ -153,6 +142,8 @@ export default {
// //
addPopData_FS:[{ addPopData_FS:[{
itemCode:null, itemCode:null,
supplierCode:null,
poNumber:null,
qty:null, qty:null,
locationCode:null, locationCode:null,
}], }],
@ -160,8 +151,20 @@ export default {
addPopColumns_FS:[ addPopColumns_FS:[
{ type: "filterSelect", label: "物品代码", prop: "itemCode", optionsLabel: "name", optionsValue: "code", { type: "filterSelect", label: "物品代码", prop: "itemCode", optionsLabel: "name", optionsValue: "code",
focus: (type,val) => { return this.getFilterList(type, val, "basedata/Item-Basic")},//this.isFilter("isRecycled","true") focus: (type,val) => { return this.getFilterList(type, val, "basedata/Item-Basic")},//this.isFilter("isRecycled","true")
searchButton: (val) => { this.showSerarchPage(val, 'basedata/Item-Basic', 'ItemBasic', '物品选择', this.addPopData_HB) }, // searchButton: (val) => { this.showSerarchPage(val, 'basedata/Item-Basic', 'ItemBasic', '', this.addPopData_HB) },
width:"auto", searchButton:false width:"auto"
},
{
type: "filterSelect", label: "供应商代码", prop: "supplierCode", optionsLabel: "supplierSimpleName", optionsValue: "supplierCode", clearable:true,
beforeFocus:(tableScope)=>{if(!this.addPopData_FS[tableScope.$index].itemCode || this.addPopData_FS[tableScope.$index].length <= 0){this.$message.error('请选择物品代码'); return false}else{return true}},
focus: (type,val,tableScope) => { return this.getFilterList(type, val, "basedata/supplier-item",this.isFilter("itemCode", this.addPopData_FS[tableScope.$index].itemCode))},
width:"auto",
},
{
type: "filterSelect", label: "采购订单号", prop: "poNumber",optionsValue: "poNumber", clearable:true,
beforeFocus:(tableScope)=>{if(!this.addPopData_FS[tableScope.$index].itemCode || this.addPopData_FS[tableScope.$index].itemCode.length <= 0 || !this.addPopData_FS[tableScope.$index].supplierCode || this.addPopData_FS[tableScope.$index].supplierCode.length <= 0){this.$message.error('请选择物品代码和供应商代码'); return false}else{return true}},
focus: (type,val,tableScope) => { return this.getFilterList(type, val, "wms/store/supplier-asn",this.isFilter("supplierCode", this.addPopData_FS[tableScope.$index].supplierCode))},
width:"auto",
}, },
{ type: "filterSelect", label: "目标库位", prop: "locationCode", optionsLabel: "name", optionsValue: "code", { type: "filterSelect", label: "目标库位", prop: "locationCode", optionsLabel: "name", optionsValue: "code",
focus: (type,val) => { return this.getFilterList(type, val, "basedata/Location",this.isFilter("type", "2"))}, focus: (type,val) => { return this.getFilterList(type, val, "basedata/Location",this.isFilter("type", "2"))},
@ -171,7 +174,7 @@ export default {
{ type: "input", validType:'pointNumber', label: "数量", prop: "qty", width:"auto", { type: "input", validType:'pointNumber', label: "数量", prop: "qty", width:"auto",
rules: [{ rules: [{
type: "number", type: "number",
trigger: ["change","blur"], trigger: ["blur"],
validator: (rule, value, callback) => { validator: (rule, value, callback) => {
let _index = rule.field.slice(8,9) let _index = rule.field.slice(8,9)
let _qty = Number(this.addPopData_FS[_index].qty) let _qty = Number(this.addPopData_FS[_index].qty)
@ -192,32 +195,25 @@ export default {
locationCode:null, locationCode:null,
qty:null qty:null
}], }],
packingsYL_Options:[],
itemPackings_YL:{},
// //
addPopColumns_YL:[ addPopColumns_YL:[
{ type: "filterSelect", label: "物品代码", prop: "itemCode", optionsLabel: "name", optionsValue: "code", { type: "filterSelect", label: "物品代码", prop: "itemCode", optionsLabel: "name", optionsValue: "code",
focus: (type,val) => { return this.getFilterList(type, val, "basedata/Item-Basic",this.isFilter("type", "10C02"))}, focus: (type,val) => { return this.getFilterList(type, val, "basedata/Item-Basic",this.isFilter("type", "10C02"))},
width:"auto" width:"auto"
}, },
// { type: "filterSelect", label: "", prop: "packingCode", { type: "filterSelect", label: "箱标签", prop: "packingCode", optionsLabel: "packingCode", optionsValue: "packingCode", clearable:true,
// // optionsLabel: "itemCode", optionsValue: "packingCode", beforeFocus:(tableScope)=>{if(!this.addPopData_YL[tableScope.$index].itemCode || this.addPopData_YL[tableScope.$index].length <= 0){this.$message.error('请选择物品代码'); return false}else{return true}},
// focus: (type,val) => { return this.getFilterList(type, val, "wms/inventory/Inventory-Balance")}, focus: (type,val,tableScope) => { return this.getFilterList(type, val, "wms/inventory/Inventory-Balance",this.isFilter("itemCode", this.addPopData_YL[tableScope.$index].itemCode))},
// colSpan: 12 width:"auto",
// },
{ type: "select", label: "箱码", prop: "packingCode",
optionsLabel: "packingCode", optionsValue: "packingCode",
userOptions:this.packingsYL_Options,width:"auto",
filterable:true,clearable:true
}, },
// todo: //
{ label: "库存数量", prop: "inventoryQty", width:"auto" }, { label: "库存数量", prop: "inventoryQty", width:"auto" },
{ label: "库位", prop: "locationCode", width:"auto" }, { label: "库位", prop: "locationCode", width:"auto" },
// todo: //
{ type: "input", validType:'pointNumber', label: "数量", prop: "qty", width:"auto", { type: "input", validType:'pointNumber', label: "数量", prop: "qty", width:"auto",
rules: [{ rules: [{
type: "number", type: "number",
trigger: ["change","blur"], trigger: ["blur"],
validator: (rule, value, callback) => { validator: (rule, value, callback) => {
let _index = rule.field.slice(8,9) let _index = rule.field.slice(8,9)
if(this.addPopData_YL[_index].qty == null){ if(this.addPopData_YL[_index].qty == null){
@ -237,15 +233,29 @@ export default {
// //
addPopData_HB:[{ addPopData_HB:[{
itemCode:null, itemCode:null,
supplierCode:null,
poNumber:null,
qty:null, qty:null,
locationCode:null, locationCode:null,
}], }],
// //
addPopColumns_HB:[ addPopColumns_HB:[
{ type: "filterSelect", label: "物品代码", prop: "itemCode", optionsLabel: "name", optionsValue: "code", { type: "filterSelect", label: "物品代码", prop: "itemCode", optionsLabel: "name", optionsValue: "code",
focus: (type,val) => { return this.getFilterList(type, val, "basedata/Item-Basic")}, focus: (type,val) => { return this.getFilterList(type, val, "basedata/Item-Basic",this.isFilterForHB())},
searchButton: (val) => { this.showSerarchPage(val, 'basedata/Item-Basic', 'ItemBasic', '物品选择', this.addPopData_HB) }, // searchButton: (val) => { this.showSerarchPage(val, 'basedata/Item-Basic', 'ItemBasic', '', this.addPopData_HB) },
width:"auto", searchButton:false width:"auto",
},
{
type: "filterSelect", label: "供应商代码", prop: "supplierCode", optionsLabel: "supplierSimpleName", optionsValue: "supplierCode", clearable:true,
beforeFocus:(tableScope)=>{if(!this.addPopData_FS[tableScope.$index].itemCode || this.addPopData_FS[tableScope.$index].length <= 0){this.$message.error('请选择物品代码'); return false}else{return true}},
focus: (type,val,tableScope) => { return this.getFilterList(type, val, "basedata/supplier-item",this.isFilter("itemCode", this.addPopData_FS[tableScope.$index].itemCode))},
width:"auto",
},
{
type: "filterSelect", label: "采购订单号", prop: "poNumber",optionsValue: "poNumber", clearable:true,
beforeFocus:(tableScope)=>{if(!this.addPopData_FS[tableScope.$index].itemCode || this.addPopData_FS[tableScope.$index].itemCode.length <= 0 || !this.addPopData_FS[tableScope.$index].supplierCode || this.addPopData_FS[tableScope.$index].supplierCode.length <= 0){this.$message.error('请选择物品代码和供应商代码'); return false}else{return true}},
focus: (type,val,tableScope) => { return this.getFilterList(type, val, "wms/store/supplier-asn",this.isFilter("supplierCode", this.addPopData_FS[tableScope.$index].supplierCode))},
width:"auto",
}, },
{ type: "filterSelect", label: "目标库位", prop: "locationCode", optionsLabel: "name", optionsValue: "code", { type: "filterSelect", label: "目标库位", prop: "locationCode", optionsLabel: "name", optionsValue: "code",
focus: (type,val) => { return this.getFilterList(type, val, "basedata/Location")}, focus: (type,val) => { return this.getFilterList(type, val, "basedata/Location")},
@ -255,7 +265,7 @@ export default {
{ type: "input", validType:'pointNumber', label: "数量", prop: "qty", width:"auto", { type: "input", validType:'pointNumber', label: "数量", prop: "qty", width:"auto",
rules: [{ rules: [{
type: "number", type: "number",
trigger: ["change","blur"], trigger: ["blur"],
validator: (rule, value, callback) => { validator: (rule, value, callback) => {
let _index = rule.field.slice(8,9) let _index = rule.field.slice(8,9)
let _qty = Number(this.addPopData_HB[_index].qty) let _qty = Number(this.addPopData_HB[_index].qty)
@ -269,7 +279,10 @@ export default {
}, },
], ],
itemStagingLists:{},// itemStagingLists:{},//
supplierStagingLists:{},//
asnStagingLists:{},//
locationStagingLists:{},// locationStagingLists:{},//
packingStagingLists:{},//
needNewPackingList:[],//N+1 needNewPackingList:[],//N+1
newPackArr:[],// newPackArr:[],//
}; };
@ -278,6 +291,25 @@ export default {
// this.paging(); // this.paging();
}, },
methods:{ methods:{
//
isFilterForHB(){
let _items = []
this.addPopData_FS.forEach(item=>{
if(item.itemCode)_items.push(item.itemCode)
})
if(_items.length <= 0){
return []
}
let filter = [
{
logic: "And",
column: 'code',
action: "NotIn",
value: JSON.stringify(_items)
}
]
return filter
},
// //
isFilter (val, data) { isFilter (val, data) {
let filter = [ let filter = [
@ -300,6 +332,8 @@ export default {
initAddPopData(){ initAddPopData(){
this.addPopData_FS=[{ this.addPopData_FS=[{
itemCode:null, itemCode:null,
supplierCode:null,
poNumber:null,
qty:null, qty:null,
locationCode:null, locationCode:null,
}] }]
@ -312,6 +346,8 @@ export default {
}] }]
this.addPopData_HB=[{ this.addPopData_HB=[{
itemCode:null, itemCode:null,
supplierCode:null,
poNumber:null,
qty:null, qty:null,
locationCode:null, locationCode:null,
}] }]
@ -328,20 +364,26 @@ export default {
}); });
}, },
// from
getFormDataInit(item,index,prop,prop_yl){
let _prop_yl = prop_yl ? prop_yl : prop;
return item.remark == '原料' ? this.packingStagingLists[item.packingCode][_prop_yl] : this.newPackArr[index][prop]
},
// todo: // todo:
lastCommitHttp(){ lastCommitHttp(){
console.log(336,this.newPackArr) this.addPopData_YL.forEach(item=>{
this.addPopColumns_YL.forEach(item=>{
item.remark = '原料' item.remark = '原料'
}) })
let _allDetails = [ let _allDetails = [
...this.addPopData_FS, ...this.addPopData_FS,
...this.addPopColumns_YL ...this.addPopData_YL
] ]
let _toData = this.addPopColumns_HB[0] let _toData = this.addPopData_HB[0]
let _toItemInfo = this.itemStagingLists[_toData.itemCode] let _toItemInfo = this.itemStagingLists[_toData.itemCode]
let _toLocationInfo = this.locationStagingLists[_toData.locationCode] let _toLocationInfo = this.locationStagingLists[_toData.locationCode]
let _toData_new = this.newPackArr[this.newPackArr.length - 1]
let _details = [] let _details = []
let _this = this
_allDetails.forEach((item,index)=>{ _allDetails.forEach((item,index)=>{
let _itemInfo = this.itemStagingLists[item.itemCode] let _itemInfo = this.itemStagingLists[item.itemCode]
let _locationInfo = this.locationStagingLists[item.locationCode] let _locationInfo = this.locationStagingLists[item.locationCode]
@ -350,42 +392,43 @@ export default {
itemCode: item.itemCode || null, itemCode: item.itemCode || null,
itemName: _itemInfo.name || null, itemName: _itemInfo.name || null,
itemDesc1: _itemInfo.desc1 || null, itemDesc1: _itemInfo.desc1 || null,
itemDesc2: _item_info.desc2 || null, itemDesc2: _itemInfo.desc2 || null,
"fromPackingCode": item.packingCode || null,//todo:packingCode fromPackingCode: item.packingCode ? item.packingCode : this.newPackArr[index].code,
toPackingCode: this.newPackArr[index], toPackingCode: _toData_new.code,
toItemCode: _toData.itemCode || null, toItemCode: _toData.itemCode || null,
toItemName: _toItemInfo.name || null, toItemName: _toItemInfo.name || null,
toItemDesc1: _toItemInfo.desc1 || null, toItemDesc1: _toItemInfo.desc1 || null,
toItemDesc2: _toItemInfo.desc2 || null, toItemDesc2: _toItemInfo.desc2 || null,
uom: _item_info.basicUom || null, uom: _itemInfo.basicUom || null,
fromQty: item.qty, fromQty: item.qty,
toQty: _toData.qty, toQty: _toData.qty,
"fromSupplierBatch": null,//todo //
"fromArriveDate": null,//todo fromSupplierBatch: this.getFormDataInit(item,index,'supplierBatch'),
"fromProduceDate": null,//todo fromArriveDate: this.getFormDataInit(item,index,'arriveDate'),
"fromExpireDate": null,//todo fromProduceDate: this.getFormDataInit(item,index,'produceDate'),
"fromLot": null,//todo fromExpireDate: this.getFormDataInit(item,index,'expireDate'),
"fromStatus": null,//todo fromLot: this.getFormDataInit(item,index,'lot'),
fromStatus: this.getFormDataInit(item,index,'labelStatus','status'),
fromLocationCode: item.locationCode || null, fromLocationCode: item.locationCode || null,
fromLocationArea: _locationInfo.areaCode || null, fromLocationArea: _locationInfo.areaCode || null,
fromLocationGroup: _locationInfo.locationGroupCode || null, fromLocationGroup: _locationInfo.locationGroupCode || null,
fromLocationErpCode: _locationInfo.erpLocationCode || null, fromLocationErpCode: _locationInfo.erpLocationCode || null,
fromWarehouseCode: _locationInfo.warehouseCode || null, fromWarehouseCode: _locationInfo.warehouseCode || null,
"fromContainerCode": null,//todo fromContainerCode: this.getFormDataInit(item,index,'containerCode'),
"toSupplierBatch": null,//todo toSupplierBatch: _toData_new.supplierBatch || null,
"toArriveDate": null,//todo toArriveDate: _toData_new.arriveDate || null,
"toProduceDate": null,//todo toProduceDate: _toData_new.produceDate || null,
"toExpireDate": null,//todo toExpireDate: _toData_new.expireDate || null,
"toLot": null,//todo toLot: _toData_new.lot || null,
"toStatus": null,//todo toStatus: 1,
toLocationCode: _toData.locationCode || null, toLocationCode: _toData.locationCode || null,
toLocationArea: _toLocationInfo.areaCode || null, toLocationArea: _toLocationInfo.areaCode || null,
toLocationGroup: _toLocationInfo.locationGroupCode || null, toLocationGroup: _toLocationInfo.locationGroupCode || null,
toLocationErpCode: _toLocationInfo.erpLocationCode || null, toLocationErpCode: _toLocationInfo.erpLocationCode || null,
toWarehouseCode: _toLocationInfo.warehouseCode || null, toWarehouseCode: _toLocationInfo.warehouseCode || null,
"toContainerCode": null,//todo toContainerCode: _toData_new.containerCode || null,
worker: store.getters.name.userName,//todo worker: store.getters.name.userName,
"reasonCode": null,//todo reasonCode: null,
} }
_details.push(_item) _details.push(_item)
}) })
@ -396,13 +439,13 @@ export default {
itemName: _toItemInfo.name || null, itemName: _toItemInfo.name || null,
itemDesc1: _toItemInfo.desc1 || null, itemDesc1: _toItemInfo.desc1 || null,
itemDesc2: _toItemInfo.desc2 || null, itemDesc2: _toItemInfo.desc2 || null,
"lot": null,//todo lot: _toData_new.lot || null,
"supplierBatch": null,//todo supplierBatch: _toData_new.supplierBatch || null,
"arriveDate": null,//todo arriveDate: _toData_new.arriveDate || null,
"produceDate": null,//todo produceDate: _toData_new.produceDate || null,
"expireDate": null,//todo expireDate: _toData_new.expireDate || null,
packingCode: this.newPackArr[this.newPackArr.length - 1], packingCode: _toData_new.code,
"containerCode": null,//todo containerCode: _toData_new.containerCode || null,
uom: _toItemInfo.basicUom || null, uom: _toItemInfo.basicUom || null,
qty: _toData.qty, qty: _toData.qty,
stdPackQty: Number(_toItemInfo.stdPackQty) || 0, stdPackQty: Number(_toItemInfo.stdPackQty) || 0,
@ -410,20 +453,20 @@ export default {
locationArea: _toLocationInfo.areaCode || null, locationArea: _toLocationInfo.areaCode || null,
locationGroup: _toLocationInfo.locationGroupCode || null, locationGroup: _toLocationInfo.locationGroupCode || null,
locationErpCode: _toLocationInfo.erpLocationCode || null, locationErpCode: _toLocationInfo.erpLocationCode || null,
"status": null,//todo status: 1,
warehouseCode: _toLocationInfo.warehouseCode || null, warehouseCode: _toLocationInfo.warehouseCode || null,
"reasonCode": null,//todo reasonCode: null,
} }
] ]
let _finalData = { let _finalData = {
"tenantId": null,//todo tenantId: null,
"remark": null,//todo remark: "",
"extraProperties": null,//todo extraProperties: null,
worker: store.getters.name.userName,//todo worker: store.getters.name.userName,
activeDate: new Date(),//todo activeDate: getNowToT(),
"number": null,//todo number: "",
"requestNumber": null,//todo requestNumber: "",
"jobNumber": null,//todo jobNumber: "",
details:_details, details:_details,
recDetails:_recDetail recDetails:_recDetail
} }
@ -450,7 +493,7 @@ export default {
// //
if(_resultBack == 1){ if(_resultBack == 1){
let _index = Number(index) + 1 let _index = Number(index) + 1
_this.resendHandle(_index) this.resendHandle(_index)
} }
// //
else{ else{
@ -463,45 +506,47 @@ export default {
let _item = this.needNewPackingList[index] let _item = this.needNewPackingList[index]
let _item_info = this.itemStagingLists[_item.itemCode] let _item_info = this.itemStagingLists[_item.itemCode]
let _location_info = this.locationStagingLists[_item.locationCode] let _location_info = this.locationStagingLists[_item.locationCode]
let _supplier_info = this.supplierStagingLists[_item.supplierCode]
let _asn_info = this.asnStagingLists[_item.poNumber]
let _creatPackData = { let _creatPackData = {
itemCode: _item_info.code || null, itemCode: _item_info.code || null,
itemName: _item_info.name || null, itemName: _item_info.name || null,
itemDesc1: _item_info.desc1 || null, itemDesc1: _item_info.desc1 || null,
itemDesc2: _item_info.desc2 || null, itemDesc2: _item_info.desc2 || null,
lot: null,//todo lot: formatTimeStampToNorm(new Date(),'date'),
supplierBatch: null,//todo arriveDate: getNowToT(),
arriveDate: null,//todo produceDate: getNowToT(),
produceDate: null,//todo expireDate: "9999-12-31",
expireDate: null,//todo
stdPackQty: Number(_item_info.stdPackQty) || 0, stdPackQty: Number(_item_info.stdPackQty) || 0,
uom: _item_info.basicUom || null, uom: _item_info.basicUom || null,
qty: Number(_item.qty), qty: Number(_item.qty),
labelStatus: 1,//todo labelStatus: 1,
recommendLocationCode: _location_info.code || null,//todo recommendLocationCode: _location_info.code || null,
locationErpCode: _location_info.erpLocationCode || null,//todo locationErpCode: _location_info.erpLocationCode || null,
containerCode: null,//todo containerCode: null,
supplierCode: null,//todo supplierCode: _item.supplierCode,
poNumber: null,//todo poNumber: _item.poNumber,
rpNumber: null,//todo rpNumber: _asn_info.rpNumber,
asnNumber: null,//todo asnNumber: _asn_info.number,
qLevel: _item_info.elevel || null,//todo qLevel: _item_info.elevel || null,
qualityFile: null,//todo qualityFile: null,
prodLine: null,//todo prodLine: null,
team: null,//todo team: null,
shift: null,//todo shift: null,
specifications: null,//todo specifications: null,
supplierName: null,//todo supplierBatch: null,//todo
supplierSimpleName: null,//todo supplierName: null,//todo:basedata/supplier-item/list
supplierItemCode: null,//todo supplierSimpleName: _supplier_info.supplierSimpleName,
supplierItemName: null,//todo supplierItemCode: _supplier_info.supplierItemCode,
labelType: null,//todo supplierItemName: null,//todo:basedata/supplier-item/list
planArriveDate: null,//todo labelType: 1,//
planArriveDate: "9999-12-31",
remark:null, remark:null,
} }
let resultBack = null let resultBack = null
// // // //
postInventoryLabelCode_count({count:1}, _creatPackData) await postInventoryLabelCode_count({count:1}, _creatPackData)
.then(res=>{ resultBack = 1;this.newPackArr[index] = res }) .then(res=>{ resultBack = 1;this.newPackArr[index] = res[0] })
.catch(err=>{ resultBack = 0 }) .catch(err=>{ resultBack = 0 })
return resultBack return resultBack
@ -511,7 +556,7 @@ export default {
// //
let _err_FS=0 let _err_FS=0
this.addPopData_FS.forEach(item=>{ this.addPopData_FS.forEach(item=>{
if(!item.itemCode || Number(item.qty <= 0) || !item.locationCode){ if(!item.itemCode || Number(item.qty <= 0) || !item.locationCode || !item.supplierCode || !item.poNumber){
_err_FS++ _err_FS++
} }
}) })
@ -533,7 +578,7 @@ export default {
// //
let _err_HB=0 let _err_HB=0
this.addPopData_HB.forEach(item=>{ this.addPopData_HB.forEach(item=>{
if(!item.itemCode || Number(item.qty <= 0) || !item.locationCode){ if(!item.itemCode || Number(item.qty <= 0) || !item.locationCode || !item.supplierCode || !item.poNumber){
_err_HB++ _err_HB++
} }
}) })
@ -558,6 +603,18 @@ export default {
pushFS(data){ pushFS(data){
if(data[1].prop == "itemCode"){ if(data[1].prop == "itemCode"){
this.itemStagingLists[data[2]] = data[0] this.itemStagingLists[data[2]] = data[0]
if(data[2] == this.addPopData_HB[0].itemCode){
this.$warningMsg("不可选择与混拌料相同的物料")
this.$nextTick(()=>{
this.addPopData_FS[data[3].$index].itemCode = null
})
}
}
if(data[1].prop == "supplierCode"){
this.supplierStagingLists[data[2]] = data[0]
}
if(data[1].prop == "poNumber"){
this.asnStagingLists[data[2]] = data[0]
} }
if(data[1].prop == "locationCode"){ if(data[1].prop == "locationCode"){
this.locationStagingLists[data[2]] = data[0] this.locationStagingLists[data[2]] = data[0]
@ -565,7 +622,16 @@ export default {
}, },
// //
pushYL(data){ pushYL(data){
if(data[1].prop="itemCode"){ if(data[1].prop=="itemCode"){
this.itemStagingLists[data[2]] = data[0]
}
else if(data[1].prop=="packingCode"){
this.packingStagingLists[data[2]] = data[0]
this.addPopData_YL[data[3].$index].packingCode = data[2]
this.addPopData_YL[data[3].$index].inventoryQty = data[0].qty
this.addPopData_YL[data[3].$index].locationCode = data[0].locationCode
this.addPopData_YL[data[3].$index].qty = null
//
let params = { let params = {
Sorting: "", Sorting: "",
MaxResultCount: 1000, MaxResultCount: 1000,
@ -573,20 +639,15 @@ export default {
condition: { condition: {
filters: [{ filters: [{
logic: "And", logic: "And",
column: "itemCode", column: "code",
action: "==", action: "==",
value: data[0].code value: data[0].locationCode
}] }]
} }
} }
this.Loading.appMainLoading = true this.Loading.appMainLoading = true
// todo: getPageList(params, "basedata/Location").then((res)=>{
console.log(311,data[3].$index) this.locationStagingLists[data[0].locationCode] = res.items[0]
this.addPopData_YL[data[3].$index].packingCode = null
this.addPopData_YL[data[3].$index].inventoryQty = null
this.addPopData_YL[data[3].$index].locationCode = null
getPageList(params, "wms/inventory/inventory-balance").then((res)=>{
this.itemPackings_YL[data[0].code] = res.items
this.Loading.appMainLoading = false this.Loading.appMainLoading = false
}) })
.catch(err=>{ .catch(err=>{
@ -594,17 +655,6 @@ export default {
}) })
} }
}, },
// selet
changeSelect_YL(prop, val,item,searchData,scope){
if(prop == 'packingCode'){
let _currentRow = this.itemPackings_YL[searchData.itemCode].filter(item=>{
return val == item.packingCode
})
// todo:
this.addPopData_YL[scope.$index].inventoryQty = _currentRow.length > 0 ? _currentRow[0].qty : null
this.addPopData_YL[scope.$index].locationCode = _currentRow.length > 0 ? _currentRow[0].locationCode : null
}
},
// //
clearHandle_YL(item,scope){ clearHandle_YL(item,scope){
this.addPopData_YL[scope.$index].packingCode = null this.addPopData_YL[scope.$index].packingCode = null
@ -612,26 +662,17 @@ export default {
this.addPopData_YL[scope.$index].locationCode = null this.addPopData_YL[scope.$index].locationCode = null
this.addPopData_YL[scope.$index].qty = null this.addPopData_YL[scope.$index].qty = null
}, },
// select/
updateSelectListTable_YL(data,item,scope,tableData){
//
if(data){
if(item.prop == "packingCode"){
this.packingsYL_Options = []
if(!tableData[scope.$index].itemCode || tableData[scope.$index].itemCode.length == 0){
this.$warningMsg("请先选择物料")
}
if(this.itemPackings_YL[tableData[scope.$index].itemCode]){
this.packingsYL_Options = this.itemPackings_YL[tableData[scope.$index].itemCode]
}
}
}
},
// //
pushHB(data){ pushHB(data){
if(data[1].prop == "itemCode"){ if(data[1].prop == "itemCode"){
this.itemStagingLists[data[2]] = data[0] this.itemStagingLists[data[2]] = data[0]
} }
if(data[1].prop == "supplierCode"){
this.supplierStagingLists[data[2]] = data[0]
}
if(data[1].prop == "poNumber"){
this.asnStagingLists[data[2]] = data[0]
}
if(data[1].prop == "locationCode"){ if(data[1].prop == "locationCode"){
this.locationStagingLists[data[2]] = data[0] this.locationStagingLists[data[2]] = data[0]
} }

163
fe/PC/src/views/rawMaterialManage/purchaseReceipt/PurchaseOrderHigher.vue

@ -0,0 +1,163 @@
<template>
<div class="page-box" v-loading="Loading.appMainLoading">
<tablePagination
:currenButtonData="currenButtonData"
:tableData="tableData"
:tableLoading="Loading.tableLoading"
:tableColumns="tableColumns"
@rowDrop="rowDrop"
:totalCount="totalCount"
:multipleSelection="multipleSelection"
:MaxResultCount="PageListParams.MaxResultCount"
@topbutton="topbutton"
@inlineDialog="inlineDialog"
@sortChange="sortChange"
@alertoldSkipCount="alertoldSkipCount"
@alterResultCount="alterResultCount"
@handleSelectionChange="handleSelectionChange"
:currentPageProps="oldSkipCount"
:quicklySearchOption="quicklySearchOption"
@quicklySearchClick="quicklySearchClick"
@quicklySearchClear="quicklySearchClear"
:primarySearchOption="primarySearchOption"
@overallSearchFormClick="overallSearchFormClick"
:httpOverallSearchData="httpOverallSearchData"
>
</tablePagination>
<!-- 新导入 disabledMethod 导入方式禁用 disabledIsAllowPartImport 是否局部导入禁用-->
<!-- methodValue 导入方式默认选项 是否局部导入 默认选项 -->
<importFile
:loading="Loading.importLoading"
:show="displayDialog.importDialog"
:URL="URL"
:disabledMethod = {method1:true,method2:false,method3:true}
:disabledIsAllowPartImport = {isAllowPartImport1:true,isAllowPartImport2:false}
isAllowPartImportValue="1"
@importClick="postImportMergeClick(arguments)"
@postImportDown="importDown"
></importFile>
<curren-Drawer
:title="tableColumns"
:DrawerLoading="Loading.DrawerLoading"
:drawer="displayDialog.detailsDialog"
:propsData="propsData"
:tabsDesTions="tabsDesTions"
:Butttondata="DrawerButtonData"
@drawerShut="(val) => (displayDialog.detailsDialog = val)"
@drawerbutton="drawerbutton"
@handleCommand="drawerHandle"
@close-value="closeValue"
:currenButtonData="currenButtonData"
:tableColumns="detailsTableColumns"
@handleSelectionChange="handleSelectionChange"
@inlineDialog="inlineDialog"
:totalCount="totalCountDetails"
:MaxResultCount="MaxResultCountDetails"
@alterResultCountDetails="alterResultCountDetails"
@alertoldSkipCountDetails="alertoldSkipCountDetails"
></curren-Drawer>
</div>
</template>
<script>
import { tableMixins } from "@/mixins/TableMixins"
import { LoadingMixins } from "@/mixins/LoadingMixins"
import { drawerMixins } from "@/mixins/drawerMixins"
import { TableHeaderMixins } from "@/mixins/TableHeaderMixins"
import { mixins } from "@/mixins/mixins"
import { processRequest, getDetailed } from '@/api/wms-api'
export default {
name: "PurchaseOrder",
mixins: [
tableMixins,
LoadingMixins,
drawerMixins,
TableHeaderMixins,
mixins
],
computed: {
hideButton: function () {
return function (val) {
let data = true
// todo:
if(this.propsData.confirmed == val){data = false}
return data
}
},
},
data () {
return {
URL: 'wms/store/purchase-order',
DrawerButtonData: [
{
type: 'danger',
icon: 'el-icon-delete-solid',
label: '关闭订单行',
hide: false,
name: "close",
size: 'mini'
},
// {
// type: 'danger',
// icon: 'el-icon-delete-solid',
// label: '',
// hide: false,
// name: "delete",
// size: 'mini'
// },
],
//
currenButtonData: [
this.defaultImportBtn(),//
this.defaultExportBtn(),//
this.defaultFieldSettingBtn(),//
this.defaultFreshBtn(),//
this.defaultFilterBtn(),//
],
};
},
mounted () {
this.paging();
},
methods: {
//
drawerbutton (val) {
//
if (val == 'close') {
let that = this
that.Loading.appMainLoading = true
// todo:
// processRequest(that.propsData.id, that.URL + '/cancel/').then(res => {
// that.$successMsg('')
// getDetailed(that.propsData.id, that.URL).then(res => {
// that.propsData = res
// })
// that.paging()
// that.Loading.appMainLoading = false
// }).catch(err => {
// console.log(err)
// that.Loading.appMainLoading = false
// })
}
//
// if (val == 'delete') {
// let that = this
// that.Loading.appMainLoading = true
// processRequest(that.propsData.id, that.URL + '/cancel/').then(res => {
// that.$successMsg('')
// getDetailed(that.propsData.id, that.URL).then(res => {
// that.propsData = res
// })
// that.paging()
// that.Loading.appMainLoading = false
// }).catch(err => {
// console.log(err)
// that.Loading.appMainLoading = false
// })
// }
},
},
};
</script>
<style lang="scss" scoped>
@import "../../../styles/mainbasicData.scss";
</style>
Loading…
Cancel
Save