安虹睿
1 year ago
28 changed files with 17 additions and 5072 deletions
@ -1,56 +0,0 @@ |
|||
import request from '@/utils/request' |
|||
// let baseURL = localStorage.getItem('print') + '/api/'
|
|||
let baseURL = localStorage.getItem('base') + '/api/' |
|||
|
|||
// 根据箱码获取标签相关信息 | 补打标签
|
|||
export function getOneInventoryLabelByCode(code) { |
|||
return request({ |
|||
url: baseURL + 'label/inventory-label/by-code/' + code, |
|||
method: 'get' |
|||
}) |
|||
} |
|||
|
|||
// 批量获取箱标签信息 | 到货请求
|
|||
export function getInventoryLabelByCodes(data) { |
|||
return request({ |
|||
url: baseURL + 'label/inventory-label/by-codes', |
|||
method: 'post', |
|||
data |
|||
}) |
|||
} |
|||
|
|||
//生产、采购生成标签(批量)| 标签管理模块
|
|||
export function postInventoryLabelCode(data) { |
|||
return request({ |
|||
url: baseURL + 'label/Inventory-label/generate-and-create/many', |
|||
method: 'post', |
|||
data |
|||
}) |
|||
} |
|||
|
|||
//生产、采购生成标签(一次多个)| 标签管理模块
|
|||
export function postInventoryLabelCode_count(params,data) { |
|||
return request({ |
|||
url: baseURL + 'label/inventory-label/generate-and-create/many/'+params.count, |
|||
method: 'post', |
|||
data |
|||
}) |
|||
} |
|||
|
|||
// 拆箱 | 标签管理-拆分箱标签
|
|||
export function postSplitPacking(data) { |
|||
return request({ |
|||
url: baseURL + 'wms/store/transfer-note/split-packing', |
|||
method: 'post', |
|||
data |
|||
}) |
|||
} |
|||
|
|||
// 拆箱记录列表
|
|||
export function splitPackingList(data) { |
|||
return request({ |
|||
url: baseURL + 'wms/store/transfer-note/get-split-packing-list', |
|||
method: 'post', |
|||
data |
|||
}) |
|||
} |
@ -1,142 +0,0 @@ |
|||
<template> |
|||
<div :style="{zIndex:zIndex,height:height,width:width}" class="pan-item"> |
|||
<div class="pan-info"> |
|||
<div class="pan-info-roles-container"> |
|||
<slot /> |
|||
</div> |
|||
</div> |
|||
<!-- eslint-disable-next-line --> |
|||
<div :style="{backgroundImage: `url(${image})`}" class="pan-thumb"></div> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
export default { |
|||
name: 'PanThumb', |
|||
props: { |
|||
image: { |
|||
type: String, |
|||
required: true |
|||
}, |
|||
zIndex: { |
|||
type: Number, |
|||
default: 1 |
|||
}, |
|||
width: { |
|||
type: String, |
|||
default: '150px' |
|||
}, |
|||
height: { |
|||
type: String, |
|||
default: '150px' |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style scoped> |
|||
.pan-item { |
|||
width: 200px; |
|||
height: 200px; |
|||
border-radius: 50%; |
|||
display: inline-block; |
|||
position: relative; |
|||
cursor: default; |
|||
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2); |
|||
} |
|||
|
|||
.pan-info-roles-container { |
|||
padding: 20px; |
|||
text-align: center; |
|||
} |
|||
|
|||
.pan-thumb { |
|||
width: 100%; |
|||
height: 100%; |
|||
background-position: center center; |
|||
background-size: cover; |
|||
border-radius: 50%; |
|||
overflow: hidden; |
|||
position: absolute; |
|||
transform-origin: 95% 40%; |
|||
transition: all 0.3s ease-in-out; |
|||
} |
|||
|
|||
/* .pan-thumb:after { |
|||
content: ''; |
|||
width: 8px; |
|||
height: 8px; |
|||
position: absolute; |
|||
border-radius: 50%; |
|||
top: 40%; |
|||
left: 95%; |
|||
margin: -4px 0 0 -4px; |
|||
background: radial-gradient(ellipse at center, rgba(14, 14, 14, 1) 0%, rgba(125, 126, 125, 1) 100%); |
|||
box-shadow: 0 0 1px rgba(255, 255, 255, 0.9); |
|||
} */ |
|||
|
|||
.pan-info { |
|||
position: absolute; |
|||
width: inherit; |
|||
height: inherit; |
|||
border-radius: 50%; |
|||
overflow: hidden; |
|||
box-shadow: inset 0 0 0 5px rgba(0, 0, 0, 0.05); |
|||
} |
|||
|
|||
.pan-info h3 { |
|||
color: #fff; |
|||
text-transform: uppercase; |
|||
position: relative; |
|||
letter-spacing: 2px; |
|||
font-size: 18px; |
|||
margin: 0 60px; |
|||
padding: 22px 0 0 0; |
|||
height: 85px; |
|||
font-family: 'Open Sans', Arial, sans-serif; |
|||
text-shadow: 0 0 1px #fff, 0 1px 2px rgba(0, 0, 0, 0.3); |
|||
} |
|||
|
|||
.pan-info p { |
|||
color: #fff; |
|||
padding: 10px 5px; |
|||
font-style: italic; |
|||
margin: 0 30px; |
|||
font-size: 12px; |
|||
border-top: 1px solid rgba(255, 255, 255, 0.5); |
|||
} |
|||
|
|||
.pan-info p a { |
|||
display: block; |
|||
color: #333; |
|||
width: 80px; |
|||
height: 80px; |
|||
background: rgba(255, 255, 255, 0.3); |
|||
border-radius: 50%; |
|||
color: #fff; |
|||
font-style: normal; |
|||
font-weight: 700; |
|||
text-transform: uppercase; |
|||
font-size: 9px; |
|||
letter-spacing: 1px; |
|||
padding-top: 24px; |
|||
margin: 7px auto 0; |
|||
font-family: 'Open Sans', Arial, sans-serif; |
|||
opacity: 0; |
|||
transition: transform 0.3s ease-in-out 0.2s, opacity 0.3s ease-in-out 0.2s, background 0.2s linear 0s; |
|||
transform: translateX(60px) rotate(90deg); |
|||
} |
|||
|
|||
.pan-info p a:hover { |
|||
background: rgba(255, 255, 255, 0.5); |
|||
} |
|||
|
|||
.pan-item:hover .pan-thumb { |
|||
transform: rotate(-110deg); |
|||
} |
|||
|
|||
.pan-item:hover .pan-info p a { |
|||
opacity: 1; |
|||
transform: translateX(0px) rotate(0deg); |
|||
} |
|||
</style> |
@ -1,654 +0,0 @@ |
|||
<template> |
|||
<el-dialog |
|||
:title="formTitle" |
|||
v-if="displayDialog.newDialog" |
|||
:visible="true" |
|||
:fullscreen="true" |
|||
:append-to-body="false" |
|||
:modal="false" |
|||
:modal-append-to-body="false" |
|||
:show-close="false" |
|||
> |
|||
<div id="stepsForm"> |
|||
<el-steps |
|||
:active="active" |
|||
process-status="finish" |
|||
finish-status="success" |
|||
:align-center="true" |
|||
> |
|||
<el-step |
|||
v-for="(item, index) in stepFilters" |
|||
:key="index" |
|||
:title="item" |
|||
></el-step> |
|||
</el-steps> |
|||
<!-- "总体信息" --> |
|||
<curren-Form |
|||
v-if="active == 0" |
|||
class="page1" |
|||
size="medium" |
|||
ref="page1" |
|||
:searchData="CreateFormData" |
|||
:searchForm="CreateForm" |
|||
:searchOptions="Options" |
|||
:searchHandle="editHandle" |
|||
:rules="Rules" |
|||
:loading="loading" |
|||
@push="DataPush(arguments)" |
|||
@submitForm="editFormClick(arguments)" |
|||
> |
|||
</curren-Form> |
|||
<!-- "物品参数" --> |
|||
<searchPage |
|||
ref="searchTable" |
|||
:tableLoading="tableLoading" |
|||
:advancedFilter="advancedFilter( |
|||
'basedata/item-basic', |
|||
pageListItemBasic, |
|||
'totalCountItemBasic', |
|||
'itemBasicData', |
|||
oldSkipCountItemBasic |
|||
)" |
|||
:filterPageListParams="[]" |
|||
:formTitle="''" |
|||
:displayDialog="active == 1" |
|||
:selectionTable="false" |
|||
:editHandle="editHandle" |
|||
:searchTableData="locationData" |
|||
:searchTableColumns="$isTableColumns.Location" |
|||
:searchTotalCount="totalCountLocation" |
|||
:supplierItemPage="pageListLocation" |
|||
@SizeChange="AddNewAlterResultCount( |
|||
$event, |
|||
'basedata/item-basic', |
|||
pageListItemBasic, |
|||
'totalCountItemBasic', |
|||
'itemBasicData', |
|||
oldSkipCountItemBasic |
|||
)" |
|||
@CurrentChange="AddNewAlertoldSkipCount( |
|||
$event, |
|||
'basedata/item-basic', |
|||
pageListItemBasic, |
|||
'totalCountItemBasic', |
|||
'itemBasicData', |
|||
oldSkipCountItemBasic |
|||
)" |
|||
@tableButtonClick="addFormData(arguments)" |
|||
></searchPage> |
|||
<!-- "库位参数" --> |
|||
<searchPage |
|||
ref="searchTable" |
|||
:tableLoading="tableLoading" |
|||
:advancedFilter="advancedFilter( |
|||
'basedata/location', |
|||
pageListLocation, |
|||
'totalCountLocation', |
|||
'locationData', |
|||
oldSkipCountLocation |
|||
)" |
|||
:filterPageListParams="[]" |
|||
:formTitle="''" |
|||
:displayDialog="active == 2" |
|||
:selectionTable="false" |
|||
:editHandle="editHandle" |
|||
:searchTableData="locationData" |
|||
:searchTableColumns="$isTableColumns.Location" |
|||
:searchTotalCount="totalCountLocation" |
|||
:supplierItemPage="pageListLocation" |
|||
@SizeChange="AddNewAlterResultCount( |
|||
$event, |
|||
'basedata/location', |
|||
pageListLocation, |
|||
'totalCountLocation', |
|||
'locationData', |
|||
oldSkipCountLocation |
|||
)" |
|||
@CurrentChange="AddNewAlertoldSkipCount( |
|||
$event, |
|||
'basedata/location', |
|||
pageListLocation, |
|||
'totalCountLocation', |
|||
'locationData', |
|||
oldSkipCountLocation |
|||
)" |
|||
@tableButtonClick="addFormData(arguments)" |
|||
></searchPage> |
|||
<!-- "其他参数" --> |
|||
<curren-Form |
|||
v-loading="loading" |
|||
v-if="active == 3" |
|||
class="page1" |
|||
size="medium" |
|||
ref="page1" |
|||
:searchData="other" |
|||
:searchForm="otherForm" |
|||
:searchOptions="Options" |
|||
:searchHandle="editHandle" |
|||
:rules="Rules" |
|||
:loading="loading" |
|||
@push="DataPush(arguments)" |
|||
@submitForm="editFormClick(arguments)" |
|||
> |
|||
</curren-Form> |
|||
<!-- <curren-Form |
|||
v-if="active === 4" |
|||
size="medium" |
|||
class="page3" |
|||
:searchData="previewFormData" |
|||
:searchForm="CreateForm | formData" |
|||
:searchHandle="editHandle" |
|||
:rules="Rules" |
|||
:loading="loading" |
|||
@submitForm="editFormClick(arguments)" |
|||
> |
|||
<template> |
|||
<el-form-item class="formTable-box" prop="details"> |
|||
<currenTable |
|||
:tableData="previewFormData.details" |
|||
:tableColumns="detailsTableColumns | formDataDetails" |
|||
:selectionTable="false" |
|||
> |
|||
</currenTable> |
|||
</el-form-item> |
|||
</template> |
|||
</curren-Form> --> |
|||
<!-- "结果" --> |
|||
<div |
|||
v-if="active === step.length - 1 && pageStatus === 'success'" |
|||
class="page4" |
|||
> |
|||
<el-result icon="success" title="成功提示" subTitle="新增成功"> |
|||
<template slot="extra"> |
|||
<!-- <el-button type="primary" size="medium" @click="tuoFormPrint" |
|||
>打印托标签</el-button |
|||
> |
|||
<el-button type="primary" size="medium" @click="xbqFormPrint" |
|||
>打印箱标签</el-button |
|||
> --> |
|||
<el-button |
|||
v-for="item in successHandle" |
|||
:key="item.label" |
|||
:type="item.type" |
|||
size="medium" |
|||
@click="item.click()" |
|||
>{{ item.label }}</el-button |
|||
> |
|||
<el-button type="primary" size="medium" @click="close(1)" |
|||
>退出</el-button |
|||
> |
|||
</template> |
|||
</el-result> |
|||
</div> |
|||
<div |
|||
v-if="active === step.length - 1 && pageStatus === 'error'" |
|||
class="page4" |
|||
> |
|||
<el-result icon="error" title="错误提示" subTitle="新增失败"> |
|||
<template slot="extra"> |
|||
<el-button type="primary" size="medium" @click="close(1)" |
|||
>退出</el-button |
|||
> |
|||
</template> |
|||
</el-result> |
|||
</div> |
|||
</div> |
|||
</el-dialog> |
|||
</template> |
|||
<script> |
|||
import currenForm from "@/components/currenForm"; |
|||
import currenTable from "@/components/currenTable"; |
|||
import { |
|||
getPageList, |
|||
postCreateWithCondition, |
|||
postCreate, |
|||
} from "@/api/wms-api"; |
|||
export default { |
|||
name: "stepsForm", |
|||
components: { |
|||
currenForm, |
|||
currenTable, |
|||
}, |
|||
watch: { |
|||
active(val) { |
|||
if (val != 0) { |
|||
this.editHandle[0].label = "上一步"; |
|||
} else { |
|||
this.editHandle[0].label = "取消"; |
|||
} |
|||
}, |
|||
}, |
|||
filters: { |
|||
formData(val) { |
|||
let data = JSON.parse(JSON.stringify(val)); |
|||
val.forEach((key, index) => { |
|||
data[index].disabled = "true"; |
|||
delete data[index].focus; |
|||
if (key.type == "autocomplete" || key.type == "import") { |
|||
data[index].type = "input"; |
|||
} |
|||
}); |
|||
return data; |
|||
}, |
|||
formDataDetails(val) { |
|||
let data = JSON.parse(JSON.stringify(val)); |
|||
val.forEach((key, index) => { |
|||
data[index].disabled = "true"; |
|||
delete data[index].focus; |
|||
delete data[index].rules; |
|||
if (key.type == "autocomplete" || key.type == "import") { |
|||
data[index].type = "input"; |
|||
} else if (key.type == "objectAutocomplete") { |
|||
data[index].type = "objectInput"; |
|||
} else if (key.prop == "containerCode") data[index].disabled = "false"; |
|||
}); |
|||
return data; |
|||
}, |
|||
}, |
|||
props: { |
|||
//名称 |
|||
formTitle: { |
|||
type: String, |
|||
default: "", |
|||
}, |
|||
//是否弹窗 |
|||
displayDialog: { |
|||
type: Object, |
|||
default: () => { |
|||
return { |
|||
newDialog: false, |
|||
}; |
|||
}, |
|||
}, |
|||
//主表提交数据 |
|||
CreateFormData: { |
|||
type: Object, |
|||
default: () => { |
|||
return {}; |
|||
}, |
|||
}, |
|||
//主表显示form |
|||
CreateForm: { |
|||
type: Array, |
|||
default: () => { |
|||
return []; |
|||
}, |
|||
}, |
|||
//预览数据 |
|||
// previewFormData: { |
|||
// type: Object, |
|||
// default: () => { |
|||
// return {} |
|||
// } |
|||
// }, |
|||
//检验 |
|||
Rules: { |
|||
type: Object, |
|||
default: () => { |
|||
return {}; |
|||
}, |
|||
}, |
|||
//下拉选择 |
|||
Options: { |
|||
type: Object, |
|||
default: () => { |
|||
return {}; |
|||
}, |
|||
}, |
|||
//子表table显示 |
|||
detailsTableColumns: { |
|||
type: Array, |
|||
default: () => { |
|||
return []; |
|||
}, |
|||
}, |
|||
//子表提交数据 |
|||
childTableData: { |
|||
type: Array, |
|||
default: () => { |
|||
return []; |
|||
}, |
|||
}, |
|||
//成功后的操作 |
|||
successHandle: { |
|||
type: Array, |
|||
default: () => { |
|||
return []; |
|||
}, |
|||
}, |
|||
}, |
|||
computed: { |
|||
stepFilters() { |
|||
let stepFilters = []; |
|||
const routeName = this.$route.meta.title; |
|||
this.step.forEach((key) => { |
|||
stepFilters.push(routeName.concat(key)); |
|||
}); |
|||
return stepFilters; |
|||
}, |
|||
// autoAdvanced () { |
|||
// if (this.active == 1) { |
|||
// return this.advancedFilter( |
|||
// 'item-basic', |
|||
// this.pageListItemBasic, |
|||
// 'totalCountItemBasic', |
|||
// 'itemBasicData', |
|||
// this.oldSkipCountItemBasic |
|||
// ) |
|||
// } else if (this.active == 2) { |
|||
// return this.advancedFilter( |
|||
// 'location', |
|||
// this.pageListLocation, |
|||
// 'totalCountLocation', |
|||
// 'locationData', |
|||
// this.oldSkipCountLocation |
|||
// ) |
|||
// } |
|||
// }, |
|||
}, |
|||
data() { |
|||
return { |
|||
active: 0, |
|||
formReveal: 1, |
|||
pageStatus: "", |
|||
filterListParams: [], |
|||
itemBasicData: [], |
|||
isItemBasicData: [], |
|||
previewFormData: [], |
|||
totalCountItemBasic: 0, |
|||
oldSkipCountItemBasic: 1, |
|||
pageListItemBasic: { |
|||
condition: { |
|||
filters: [], |
|||
}, |
|||
Sorting: "", |
|||
SkipCount: 0, |
|||
MaxResultCount: 100, |
|||
}, |
|||
locationData: [], |
|||
isLocationData: [], |
|||
totalCountLocation: 0, |
|||
oldSkipCountLocation: 1, |
|||
pageListLocation: { |
|||
condition: { |
|||
filters: [], |
|||
}, |
|||
Sorting: "", |
|||
SkipCount: 0, |
|||
MaxResultCount: 100, |
|||
}, |
|||
other: { |
|||
otherParam: [], |
|||
}, |
|||
otherForm: [ |
|||
{ |
|||
label: "状态", |
|||
prop: "otherParam", |
|||
type: "checkbox", |
|||
indeterminate:"true", |
|||
checkboxs: "radios", |
|||
}, |
|||
], |
|||
otherFormData: { |
|||
countMethod: 0, |
|||
// type: 0,//盘点类型 |
|||
company: null, |
|||
description: null, |
|||
// beginTime: null, |
|||
// endTime: null, |
|||
planTime: null, |
|||
partCondition: {}, |
|||
locCondition: {}, |
|||
statusList: [], |
|||
worker: null, |
|||
warehouseCode: null, |
|||
remark: null, |
|||
}, |
|||
loading: false, |
|||
tableLoading: false, |
|||
session: null, |
|||
step: ["总体信息", "物品参数", "库位参数", "其他参数", "结果"], |
|||
editHandle: [ |
|||
{ label: "取消", name: "cancel" }, |
|||
{ label: "下一步", type: "primary", name: "determine" }, |
|||
], |
|||
}; |
|||
}, |
|||
mounted() { |
|||
this.session = JSON.parse(JSON.stringify(this.CreateFormData)); |
|||
}, |
|||
methods: { |
|||
//结束退出 |
|||
close(val) { |
|||
this.active = 0; |
|||
const filter ={ |
|||
condition: { |
|||
filters: [], |
|||
}, |
|||
Sorting: "", |
|||
SkipCount: 0, |
|||
MaxResultCount: 100, |
|||
} |
|||
this.pageListItemBasic = JSON.parse(JSON.stringify(filter)) |
|||
this.pageListLocation = JSON.parse(JSON.stringify(filter)) |
|||
const data = JSON.parse(JSON.stringify(this.session)); |
|||
this.itemBasicData = [] |
|||
this.locationData = [] |
|||
this.$emit("close", data, val); |
|||
}, |
|||
//autoComplete主表 |
|||
DataPush(val) { |
|||
this.$emit("DataPush", val); |
|||
}, |
|||
//autoComplete子表 |
|||
detailsDataPush(val) { |
|||
this.$emit("detailsDataPush", val); |
|||
}, |
|||
//确定筛选 |
|||
advancedFilter(url, list, TotalCount, data, oldSkipCount) { |
|||
return () => { |
|||
list.SkipCount = (oldSkipCount - 1) * list.MaxResultCount; |
|||
this.tableLoading = true; |
|||
getPageList(list, url) |
|||
.then((res) => { |
|||
this[data] = res.items; |
|||
this[TotalCount] = res.totalCount; |
|||
this.tableLoading = false; |
|||
}) |
|||
.catch(() => { |
|||
this.tableLoading = false; |
|||
}); |
|||
}; |
|||
}, |
|||
//选择子表(接收分页组件emit改变每页最大页数) |
|||
AddNewAlterResultCount(val, url, list, TotalCount, data, oldSkipCount) { |
|||
list.MaxResultCount = val; |
|||
const Function = this.advancedFilter( |
|||
url, |
|||
list, |
|||
TotalCount, |
|||
data, |
|||
oldSkipCount |
|||
); |
|||
Function(); |
|||
}, |
|||
//选择子表(接收分页组件emit改变当前页) |
|||
AddNewAlertoldSkipCount(val, url, list, TotalCount, data, oldSkipCount) { |
|||
oldSkipCount = val; |
|||
const Function = this.advancedFilter( |
|||
url, |
|||
list, |
|||
TotalCount, |
|||
data, |
|||
oldSkipCount |
|||
); |
|||
Function(); |
|||
}, |
|||
//打印托标签 |
|||
tuoFormPrint() { |
|||
this.$emit("tuoFormPrint"); |
|||
}, |
|||
//打印箱标签 |
|||
xbqFormPrint() { |
|||
this.$emit("xbqFormPrint"); |
|||
}, |
|||
// //添加封装 |
|||
// addNew (url, list, TotalCount, data, MaxResultItem) { |
|||
// list.SkipCount = 0 |
|||
// list.MaxResultCount = JSON.parse(TotalCount) |
|||
// getPageList(list, url).then((res) => { |
|||
// this[data] = res.items |
|||
// list.MaxResultCount = MaxResultItem |
|||
// }) |
|||
// }, |
|||
//添加明细 |
|||
addFormData(val) { |
|||
if (val[0] == "cancel") { |
|||
this.active--; |
|||
} else { |
|||
if (this.active == 1) { |
|||
const MaxResultItem = JSON.parse( |
|||
this.pageListItemBasic.MaxResultCount |
|||
); |
|||
// this.addNew('item-basic', this.pageListItemBasic, this.totalCountItemBasic, 'isItemBasicData', MaxResultItem) |
|||
// this.pageListItemBasic.MaxResultCount = MaxResultItem |
|||
const Function = this.advancedFilter( |
|||
"basedata/location", |
|||
this.pageListLocation, |
|||
"totalCountLocation", |
|||
"locationData", |
|||
this.oldSkipCountLocation |
|||
); |
|||
Function(); |
|||
this.$nextTick(()=>{ |
|||
this.active++; |
|||
}) |
|||
} else if (this.active == 2) { |
|||
const MaxResultLocation = JSON.parse( |
|||
this.pageListLocation.MaxResultCount |
|||
); |
|||
// this.addNew('location', this.pageListLocation, this.totalCountLocation, 'isLocationData', MaxResultLocation) |
|||
// this.pageListLocation.MaxResultCount = MaxResultLocation |
|||
this.active++; |
|||
} |
|||
} |
|||
}, |
|||
//拆分 |
|||
splitFormData(val) { |
|||
return new Promise((resolve, reject) => { |
|||
postCreateWithCondition(val, "wms/store/count-plan") |
|||
.then((res) => { |
|||
this.previewFormData = JSON.parse( |
|||
JSON.stringify(this.CreateFormData) |
|||
); |
|||
// delete this.previewFormData.details |
|||
this.$listAssign(this.previewFormData, res); |
|||
this.previewFormData.details = []; |
|||
res.details.forEach((item) => { |
|||
const details = JSON.parse( |
|||
JSON.stringify(...this.childTableData) |
|||
); |
|||
this.$listAssign(details, item); |
|||
this.previewFormData.details.push(details); |
|||
}); |
|||
resolve(); |
|||
}) |
|||
.catch((err) => { |
|||
reject(); |
|||
}); |
|||
}); |
|||
}, |
|||
editFormClick(val) { |
|||
// Moment(this.CreateFormData.arriveTime).format() |
|||
if (val[0] == 0) { |
|||
if (this.active == 0) { |
|||
this.close(0); |
|||
} else { |
|||
this.active--; |
|||
} |
|||
} else { |
|||
val[1].validate((valid) => { |
|||
if (valid) { |
|||
if (this.active == 0) { |
|||
const Function = this.advancedFilter( |
|||
"basedata/item-basic", |
|||
this.pageListItemBasic, |
|||
"totalCountItemBasic", |
|||
"itemBasicData", |
|||
this.oldSkipCountItemBasic |
|||
); |
|||
Function(); |
|||
this.active++; |
|||
} else if (this.active == 3) { |
|||
this.$listAssign(this.otherFormData, this.CreateFormData); |
|||
this.otherFormData.partCondition = |
|||
this.pageListItemBasic.condition; |
|||
this.otherFormData.locCondition = this.pageListLocation.condition; |
|||
this.otherFormData.statusList = []; |
|||
let checkboxArray = [] |
|||
this.other.otherParam.forEach(item => { |
|||
if (item == '待检') { |
|||
checkboxArray.push(1) |
|||
} else if (item == '合格') { |
|||
checkboxArray.push(2) |
|||
} else if (item == '不合格') { |
|||
checkboxArray.push(3) |
|||
} else if (item == '隔离') { |
|||
checkboxArray.push(4) |
|||
} else if (item == '破坏') { |
|||
checkboxArray.push(5) |
|||
} else if (item == '冻结') { |
|||
checkboxArray.push(6) |
|||
} |
|||
}) |
|||
// 待检', '合格', '不合格', '隔离', '破坏', '冻结' |
|||
this.otherFormData.statusList = checkboxArray; |
|||
this.otherFormData.vendCondition = { |
|||
filters:[] |
|||
} |
|||
this.loading = true; |
|||
this.otherFormData.requestType = 2 |
|||
this.splitFormData(this.otherFormData).then( |
|||
(resolve) => { |
|||
this.pageStatus = "success"; |
|||
this.active++; |
|||
this.loading = false; |
|||
}, |
|||
(reject) => { |
|||
this.pageStatus = "error"; |
|||
this.active++; |
|||
this.loading = false; |
|||
} |
|||
); |
|||
} |
|||
// else if (this.active == 4) { |
|||
// postCreate(this.previewFormData, 'count-plan').then(res => { |
|||
// this.pageStatus = 'success' |
|||
// this.active++ |
|||
// this.loading = false |
|||
// }).catch(err => { |
|||
// this.pageStatus = 'error' |
|||
// this.active++ |
|||
// this.loading = false |
|||
// }) |
|||
// } |
|||
else { |
|||
this.$errorMsg("请检查表单"); |
|||
} |
|||
} |
|||
}); |
|||
} |
|||
}, |
|||
}, |
|||
}; |
|||
</script> |
|||
<style lang="scss" scoped> |
|||
@import "./style/index.scss"; |
|||
</style> |
|||
<style lang="scss"> |
|||
#stepsForm{ |
|||
.formButton{ |
|||
text-align: right; |
|||
} |
|||
} |
|||
</style> |
@ -1,723 +0,0 @@ |
|||
<template> |
|||
<el-dialog |
|||
:title="formTitle" |
|||
v-if="displayDialog.newDialog" |
|||
:visible="true" |
|||
:fullscreen="true" |
|||
:append-to-body="false" |
|||
:modal="false" |
|||
:modal-append-to-body="false" |
|||
:show-close="false" |
|||
> |
|||
<div id="stepsForm"> |
|||
<el-steps |
|||
:active="active" |
|||
process-status="finish" |
|||
finish-status="success" |
|||
:align-center="true" |
|||
> |
|||
<el-step |
|||
v-for="(item, index) in stepFilters" |
|||
:key="index" |
|||
:title="item" |
|||
></el-step> |
|||
</el-steps> |
|||
<!-- 总体信息 --> |
|||
<curren-Form |
|||
v-if="active == 0" |
|||
class="page1" |
|||
size="medium" |
|||
ref="page1" |
|||
:searchData="CreateFormData" |
|||
:searchForm="CreateForm" |
|||
:searchOptions="Options" |
|||
:searchHandle="editHandle" |
|||
:rules="Rules" |
|||
:loading="loading" |
|||
@push="DataPush(arguments)" |
|||
@submitForm="editFormClick(arguments)" |
|||
> |
|||
</curren-Form> |
|||
<!-- 库位参数 --> |
|||
<!-- 搜索按钮——窗体组件LocationForPADPlan --> |
|||
<searchPage |
|||
v-if="active == 1" |
|||
@sxBtnClickHandle="sxBtnClickHandle" |
|||
ref="searchTable" |
|||
:tableLoading="tableLoading" |
|||
:filterActionOptions="filterActionOptions" |
|||
:advancedFilter="advancedFilter( |
|||
'basedata/location', |
|||
pageListLocation, |
|||
'totalCountLocation', |
|||
'locationData', |
|||
oldSkipCountLocation |
|||
)" |
|||
:setUTableHeight="355" |
|||
:filterPageListParams="[]" |
|||
:formTitle="''" |
|||
:displayDialog="active == 1" |
|||
:selectionTable="false" |
|||
:editHandle="editHandle" |
|||
:buttonsAllIsRight="true" |
|||
:searchTableData="locationData" |
|||
:searchTableColumns="initSearchPageTableColums()" |
|||
:searchTotalCount="totalCountLocation" |
|||
:supplierItemPage="pageListLocation" |
|||
@SizeChange="AddNewAlterResultCount( |
|||
$event, |
|||
'basedata/location', |
|||
pageListLocation, |
|||
'totalCountLocation', |
|||
'locationData', |
|||
oldSkipCountLocation |
|||
)" |
|||
@CurrentChange="AddNewAlertoldSkipCount( |
|||
$event, |
|||
'basedata/location', |
|||
pageListLocation, |
|||
'totalCountLocation', |
|||
'locationData', |
|||
oldSkipCountLocation |
|||
)" |
|||
@tableButtonClick="addFormData(arguments)" |
|||
></searchPage> |
|||
<!-- @filterBtnClickHandle="filterBtnClickHandle" --> |
|||
<!-- 其他参数 --> |
|||
<curren-Form |
|||
v-loading="loading" |
|||
v-if="active == 2" |
|||
class="page1" |
|||
size="medium" |
|||
ref="page1" |
|||
:searchData="other" |
|||
:searchForm="otherForm" |
|||
:searchOptions="Options" |
|||
:searchHandle="editHandle" |
|||
:rules="Rules" |
|||
:loading="loading" |
|||
@push="DataPush(arguments)" |
|||
@submitForm="editFormClick(arguments)" |
|||
> |
|||
</curren-Form> |
|||
<!-- <curren-Form |
|||
v-if="active === 4" |
|||
size="medium" |
|||
class="page3" |
|||
:searchData="previewFormData" |
|||
:searchForm="CreateForm | formData" |
|||
:searchHandle="editHandle" |
|||
:rules="Rules" |
|||
:loading="loading" |
|||
@submitForm="editFormClick(arguments)" |
|||
> |
|||
<template> |
|||
<el-form-item class="formTable-box" prop="details"> |
|||
<currenTable |
|||
:tableData="previewFormData.details" |
|||
:tableColumns="detailsTableColumns | formDataDetails" |
|||
:selectionTable="false" |
|||
> |
|||
</currenTable> |
|||
</el-form-item> |
|||
</template> |
|||
</curren-Form> --> |
|||
<div |
|||
v-if="active === step.length - 1 && pageStatus === 'success'" |
|||
class="page4" |
|||
> |
|||
<el-result icon="success" title="成功提示" subTitle="新增成功"> |
|||
<template slot="extra"> |
|||
<!-- <el-button type="primary" size="medium" @click="tuoFormPrint" |
|||
>打印托标签</el-button |
|||
> |
|||
<el-button type="primary" size="medium" @click="xbqFormPrint" |
|||
>打印箱标签</el-button |
|||
> --> |
|||
<el-button |
|||
v-for="item in successHandle" |
|||
:key="item.label" |
|||
:type="item.type" |
|||
size="medium" |
|||
@click="item.click()" |
|||
>{{ item.label }}</el-button |
|||
> |
|||
<el-button type="primary" size="medium" @click="close(1)" |
|||
>退出</el-button |
|||
> |
|||
</template> |
|||
</el-result> |
|||
</div> |
|||
<div |
|||
v-if="active === step.length - 1 && pageStatus === 'error'" |
|||
class="page4" |
|||
> |
|||
<el-result icon="error" title="错误提示" subTitle="新增失败"> |
|||
<template slot="extra"> |
|||
<el-button type="primary" size="medium" @click="close(1)" |
|||
>退出</el-button |
|||
> |
|||
</template> |
|||
</el-result> |
|||
</div> |
|||
</div> |
|||
</el-dialog> |
|||
</template> |
|||
<script> |
|||
import currenForm from "@/components/currenForm"; |
|||
import currenTable from "@/components/currenTable"; |
|||
import { |
|||
getPageList, |
|||
postCreateWithCondition, |
|||
postCreate, |
|||
} from "@/api/wms-api"; |
|||
export default { |
|||
name: "stepsForm", |
|||
components: { |
|||
currenForm, |
|||
currenTable, |
|||
}, |
|||
watch: { |
|||
active(val) { |
|||
if (val != 0) { |
|||
this.editHandle[0].label = "上一步"; |
|||
} else { |
|||
this.editHandle[0].label = "取消"; |
|||
} |
|||
}, |
|||
}, |
|||
filters: { |
|||
formData(val) { |
|||
let data = JSON.parse(JSON.stringify(val)); |
|||
val.forEach((key, index) => { |
|||
data[index].disabled = "true"; |
|||
delete data[index].focus; |
|||
if (key.type == "autocomplete" || key.type == "import") { |
|||
data[index].type = "input"; |
|||
} |
|||
}); |
|||
return data; |
|||
}, |
|||
formDataDetails(val) { |
|||
let data = JSON.parse(JSON.stringify(val)); |
|||
val.forEach((key, index) => { |
|||
data[index].disabled = "true"; |
|||
delete data[index].focus; |
|||
delete data[index].rules; |
|||
if (key.type == "autocomplete" || key.type == "import") { |
|||
data[index].type = "input"; |
|||
} else if (key.type == "objectAutocomplete") { |
|||
data[index].type = "objectInput"; |
|||
} else if (key.prop == "containerCode") data[index].disabled = "false"; |
|||
}); |
|||
return data; |
|||
}, |
|||
}, |
|||
props: { |
|||
//名称 |
|||
formTitle: { |
|||
type: String, |
|||
default: "", |
|||
}, |
|||
//是否弹窗 |
|||
displayDialog: { |
|||
type: Object, |
|||
default: () => { |
|||
return { |
|||
newDialog: false, |
|||
}; |
|||
}, |
|||
}, |
|||
//主表提交数据 |
|||
CreateFormData: { |
|||
type: Object, |
|||
default: () => { |
|||
return {}; |
|||
}, |
|||
}, |
|||
//主表显示form |
|||
CreateForm: { |
|||
type: Array, |
|||
default: () => { |
|||
return []; |
|||
}, |
|||
}, |
|||
//预览数据 |
|||
// previewFormData: { |
|||
// type: Object, |
|||
// default: () => { |
|||
// return {} |
|||
// } |
|||
// }, |
|||
//检验 |
|||
Rules: { |
|||
type: Object, |
|||
default: () => { |
|||
return {}; |
|||
}, |
|||
}, |
|||
//下拉选择 |
|||
Options: { |
|||
type: Object, |
|||
default: () => { |
|||
return {}; |
|||
}, |
|||
}, |
|||
//子表table显示 |
|||
detailsTableColumns: { |
|||
type: Array, |
|||
default: () => { |
|||
return []; |
|||
}, |
|||
}, |
|||
//子表提交数据 |
|||
childTableData: { |
|||
type: Array, |
|||
default: () => { |
|||
return []; |
|||
}, |
|||
}, |
|||
//成功后的操作 |
|||
successHandle: { |
|||
type: Array, |
|||
default: () => { |
|||
return []; |
|||
}, |
|||
}, |
|||
}, |
|||
computed: { |
|||
stepFilters() { |
|||
let stepFilters = []; |
|||
const routeName = this.$route.meta.title; |
|||
this.step.forEach((key) => { |
|||
stepFilters.push(routeName.concat(key)); |
|||
}); |
|||
return stepFilters; |
|||
}, |
|||
// autoAdvanced () { |
|||
// if (this.active == 1) { |
|||
// return this.advancedFilter( |
|||
// 'item-basic', |
|||
// this.pageListItemBasic, |
|||
// 'totalCountItemBasic', |
|||
// 'itemBasicData', |
|||
// this.oldSkipCountItemBasic |
|||
// ) |
|||
// } else if (this.active == 2) { |
|||
// return this.advancedFilter( |
|||
// 'location', |
|||
// this.pageListLocation, |
|||
// 'totalCountLocation', |
|||
// 'locationData', |
|||
// this.oldSkipCountLocation |
|||
// ) |
|||
// } |
|||
// }, |
|||
}, |
|||
data() { |
|||
return { |
|||
active: 0, |
|||
formReveal: 1, |
|||
pageStatus: "", |
|||
filterListParams: [], |
|||
itemBasicData: [], |
|||
isItemBasicData: [], |
|||
previewFormData: [], |
|||
totalCountItemBasic: 0, |
|||
oldSkipCountItemBasic: 1, |
|||
pageListItemBasic: { |
|||
condition: { |
|||
filters: [], |
|||
}, |
|||
Sorting: "", |
|||
SkipCount: 0, |
|||
MaxResultCount: 100, |
|||
}, |
|||
locationData: [], |
|||
isLocationData: [], |
|||
totalCountLocation: 0, |
|||
oldSkipCountLocation: 1, |
|||
pageListLocation: { |
|||
condition: { |
|||
filters: [], |
|||
}, |
|||
Sorting: "", |
|||
SkipCount: 0, |
|||
MaxResultCount: 100, |
|||
}, |
|||
other: { |
|||
otherParam: [], |
|||
}, |
|||
otherForm: [ |
|||
{ |
|||
label: "状态", |
|||
prop: "otherParam", |
|||
type: "checkbox", |
|||
indeterminate:"true", |
|||
checkboxs: "radios", |
|||
}, |
|||
], |
|||
otherFormData: { |
|||
countMethod: 0, |
|||
// type: 0,//盘点类型 |
|||
company: null, |
|||
description: null, |
|||
// beginTime: null, |
|||
// endTime: null, |
|||
planTime: null, |
|||
partCondition: {}, |
|||
locCondition: {}, |
|||
statusList: [], |
|||
worker: null, |
|||
warehouseCode: null, |
|||
remark: null, |
|||
requestType: null, |
|||
}, |
|||
loading: false, |
|||
tableLoading: false, |
|||
session: null, |
|||
// step: ["总体信息", "物品参数", "库位参数", "其他参数", "结果"], |
|||
step: ["总体信息", "库位参数", "其他参数", "结果"], |
|||
editHandle: [ |
|||
{ label: "取消", name: "cancel" }, |
|||
{ label: "下一步", type: "primary", name: "determine" }, |
|||
], |
|||
filterActionOptions:[{ |
|||
value: '==', |
|||
label: '等于' |
|||
}, { |
|||
value: '!=', |
|||
label: '不等于' |
|||
}], |
|||
// 用户筛选暂存(如果筛选是code:value值为数组的格式) |
|||
filterOptionCopyForMutiple:[], |
|||
// 库位筛选,默认去掉的库位代码 |
|||
filterCodeExclude:'INSPECT,HOLD,TRANSFERONTHEWAY', |
|||
}; |
|||
}, |
|||
mounted() { |
|||
this.session = JSON.parse(JSON.stringify(this.CreateFormData)); |
|||
}, |
|||
methods: { |
|||
// 初始化库位筛选列表数据,目的:pda的库位类型不可以选择线边库位 |
|||
initSearchPageTableColums(){ |
|||
// let _list = JSON.parse(JSON.stringify(this.$isTableColumns.Location)); |
|||
let _list = JSON.parse(JSON.stringify(this.$isTableColumns.CountPlanByAddLocation)); |
|||
_list.forEach(item => { |
|||
// 如果是pda类型盘点,库位类型 则使用 locationTypeForPADPlan 枚举(区别为线边库位为不可选) |
|||
// 如果是Excel类型盘点,库位类型 则使用 locationTypeForExcelPlan 枚举(区别为原材料库位为不可选) |
|||
if(item.prop == 'type'){ |
|||
item.filters = this.CreateFormData.requestType == 2 ? 'locationTypeForPADPlan' : 'locationTypeForExcelPlan' |
|||
} |
|||
}); |
|||
return _list |
|||
}, |
|||
//结束退出 |
|||
close(val) { |
|||
this.active = 0; |
|||
const filter ={ |
|||
condition: { |
|||
filters: [], |
|||
}, |
|||
Sorting: "", |
|||
SkipCount: 0, |
|||
MaxResultCount: 100, |
|||
} |
|||
this.pageListItemBasic = JSON.parse(JSON.stringify(filter)) |
|||
this.pageListLocation = JSON.parse(JSON.stringify(filter)) |
|||
const data = JSON.parse(JSON.stringify(this.session)); |
|||
this.itemBasicData = [] |
|||
this.locationData = [] |
|||
this.$emit("close", data, val); |
|||
}, |
|||
//autoComplete主表 |
|||
DataPush(val) { |
|||
this.$emit("DataPush", val); |
|||
}, |
|||
//autoComplete子表 |
|||
detailsDataPush(val) { |
|||
this.$emit("detailsDataPush", val); |
|||
}, |
|||
// 点击筛选按钮 20230704 |
|||
sxBtnClickHandle(data){ |
|||
// 合并code多选,进行回显 20230705更新 |
|||
this.$refs.searchTable.setScreenDataFilters(this.filterOptionCopyForMutiple) |
|||
}, |
|||
//确定筛选 |
|||
advancedFilter(url, list, TotalCount, data, oldSkipCount) { |
|||
return () => { |
|||
list.SkipCount = (oldSkipCount - 1) * list.MaxResultCount; |
|||
this.tableLoading = true; |
|||
// 盘点库存 过滤线边仓数据 20230703更新 |
|||
// 如果是Excel盘点类型(this.CreateFormData.requestType == 1),过滤原材料2 |
|||
// 如果不是Excel盘点类型(this.CreateFormData.requestType != 1),过滤线边仓数据5 |
|||
let type_value = this.CreateFormData.requestType == 1 ? '2' : '5' |
|||
let _filter = { |
|||
action: "!=", |
|||
column: "type", |
|||
logic: "And", |
|||
value: type_value, |
|||
hide:true |
|||
} |
|||
// 库位筛选,默认去掉的库位代码 |
|||
let _filter_code = { |
|||
action: "!=", |
|||
column: "code", |
|||
logic: "And", |
|||
value: this.filterCodeExclude, |
|||
hide: true |
|||
} |
|||
if(this.pageListLocation.condition.filters.length <= 0){ |
|||
this.pageListLocation.condition.filters.push(_filter) |
|||
this.pageListLocation.condition.filters.push(_filter_code) |
|||
} |
|||
// code多选处理 20230705更新 |
|||
this.filterOptionCopyForMutiple = JSON.parse(JSON.stringify(list.condition.filters)) |
|||
let _filters = [] |
|||
// 拆分code多选,回传给接口 |
|||
this.filterOptionCopyForMutiple.forEach((option)=>{ |
|||
if(option.column == 'code'){ |
|||
option.value.split(',').forEach((val,val_index)=>{ |
|||
// 如果是第一位 则是用户选择的条件 否则判断是否为!= (And) 还是 == (Or) |
|||
let _logic = val_index == 0 ? option.logic : (option.action == '!=' ? 'And' : 'Or') |
|||
if((val || val == 0) && val.length > 0){ |
|||
let _item = { |
|||
action: option.action, |
|||
column: option.column, |
|||
logic: _logic, |
|||
value: val, |
|||
} |
|||
_filters.push(_item) |
|||
} |
|||
}) |
|||
}else{ |
|||
_filters.push(option) |
|||
} |
|||
}) |
|||
list.condition.filters = _filters |
|||
getPageList(list, url) |
|||
.then((res) => { |
|||
this[data] = res.items; |
|||
this[TotalCount] = res.totalCount; |
|||
this.tableLoading = false; |
|||
}) |
|||
.catch(() => { |
|||
this.tableLoading = false; |
|||
}); |
|||
}; |
|||
}, |
|||
//选择子表(接收分页组件emit改变每页最大页数) |
|||
AddNewAlterResultCount(val, url, list, TotalCount, data, oldSkipCount) { |
|||
list.MaxResultCount = val; |
|||
const Function = this.advancedFilter( |
|||
url, |
|||
list, |
|||
TotalCount, |
|||
data, |
|||
oldSkipCount |
|||
); |
|||
Function(); |
|||
}, |
|||
//选择子表(接收分页组件emit改变当前页) |
|||
AddNewAlertoldSkipCount(val, url, list, TotalCount, data, oldSkipCount) { |
|||
oldSkipCount = val; |
|||
const Function = this.advancedFilter( |
|||
url, |
|||
list, |
|||
TotalCount, |
|||
data, |
|||
oldSkipCount |
|||
); |
|||
Function(); |
|||
}, |
|||
//打印托标签 |
|||
tuoFormPrint() { |
|||
this.$emit("tuoFormPrint"); |
|||
}, |
|||
//打印箱标签 |
|||
xbqFormPrint() { |
|||
this.$emit("xbqFormPrint"); |
|||
}, |
|||
// //添加封装 |
|||
// addNew (url, list, TotalCount, data, MaxResultItem) { |
|||
// list.SkipCount = 0 |
|||
// list.MaxResultCount = JSON.parse(TotalCount) |
|||
// getPageList(list, url).then((res) => { |
|||
// this[data] = res.items |
|||
// list.MaxResultCount = MaxResultItem |
|||
// }) |
|||
// }, |
|||
//添加明细(上一步) |
|||
addFormData(val) { |
|||
if (val[0] == "cancel") { |
|||
this.active--; |
|||
} else { |
|||
// 物品参数 |
|||
// if (this.active == 1) { |
|||
// const MaxResultItem = JSON.parse( |
|||
// this.pageListItemBasic.MaxResultCount |
|||
// ); |
|||
// // this.addNew('item-basic', this.pageListItemBasic, this.totalCountItemBasic, 'isItemBasicData', MaxResultItem) |
|||
// // this.pageListItemBasic.MaxResultCount = MaxResultItem |
|||
// const Function = this.advancedFilter( |
|||
// "basedata/location", |
|||
// this.pageListLocation, |
|||
// "totalCountLocation", |
|||
// "locationData", |
|||
// this.oldSkipCountLocation |
|||
// ); |
|||
// Function(); |
|||
// this.$nextTick(()=>{ |
|||
// this.active++; |
|||
// }) |
|||
// } |
|||
// 库位参数 |
|||
if (this.active == 1) { |
|||
const MaxResultLocation = JSON.parse( |
|||
this.pageListLocation.MaxResultCount |
|||
); |
|||
// this.addNew('location', this.pageListLocation, this.totalCountLocation, 'isLocationData', MaxResultLocation) |
|||
// this.pageListLocation.MaxResultCount = MaxResultLocation |
|||
this.active++; |
|||
} |
|||
} |
|||
}, |
|||
//拆分 |
|||
splitFormData(val) { |
|||
return new Promise((resolve, reject) => { |
|||
postCreateWithCondition(val, "wms/store/count-plan") |
|||
.then((res) => { |
|||
this.previewFormData = JSON.parse( |
|||
JSON.stringify(this.CreateFormData) |
|||
); |
|||
// delete this.previewFormData.details |
|||
this.$listAssign(this.previewFormData, res); |
|||
this.previewFormData.details = []; |
|||
res.details.forEach((item) => { |
|||
const details = JSON.parse( |
|||
JSON.stringify(...this.childTableData) |
|||
); |
|||
this.$listAssign(details, item); |
|||
this.previewFormData.details.push(details); |
|||
}); |
|||
resolve(); |
|||
}) |
|||
.catch((err) => { |
|||
reject(); |
|||
}); |
|||
}); |
|||
}, |
|||
// 下一步 |
|||
editFormClick(val) { |
|||
// Moment(this.CreateFormData.arriveTime).format() |
|||
if (val[0] == 0) { |
|||
if (this.active == 0) { |
|||
this.close(0); |
|||
} else { |
|||
this.active--; |
|||
} |
|||
} else { |
|||
val[1].validate((valid) => { |
|||
if (valid) { |
|||
// 总体信息 |
|||
if (this.active == 0) { |
|||
this.pageListLocation.condition.filters = [] |
|||
const Function = this.advancedFilter( |
|||
// "basedata/item-basic", |
|||
// this.pageListItemBasic, |
|||
// "totalCountItemBasic", |
|||
// "itemBasicData", |
|||
// this.oldSkipCountItemBasic |
|||
'basedata/location', |
|||
this.pageListLocation, |
|||
'totalCountLocation', |
|||
'locationData', |
|||
this.oldSkipCountLocation |
|||
); |
|||
Function(); |
|||
this.active++; |
|||
} |
|||
// 其他参数 |
|||
else if (this.active == 2) { |
|||
this.$listAssign(this.otherFormData, this.CreateFormData); |
|||
this.otherFormData.partCondition = |
|||
this.pageListItemBasic.condition; |
|||
this.otherFormData.locCondition = this.pageListLocation.condition; |
|||
this.otherFormData.statusList = []; |
|||
let checkboxArray = [] |
|||
this.other.otherParam.forEach(item => { |
|||
if (item == '待检') { |
|||
checkboxArray.push(1) |
|||
} else if (item == '合格') { |
|||
checkboxArray.push(2) |
|||
} else if (item == '不合格') { |
|||
checkboxArray.push(3) |
|||
} else if (item == '隔离') { |
|||
checkboxArray.push(4) |
|||
} else if (item == '破坏') { |
|||
checkboxArray.push(5) |
|||
} else if (item == '冻结') { |
|||
checkboxArray.push(6) |
|||
} |
|||
}) |
|||
// 待检', '合格', '不合格', '隔离', '破坏', '冻结' |
|||
this.otherFormData.statusList = checkboxArray; |
|||
this.otherFormData.vendCondition = { |
|||
filters:[] |
|||
} |
|||
if(this.otherFormData.statusList.length <= 0){ |
|||
this.$warningMsg("请选择状态"); |
|||
return |
|||
} |
|||
this.loading = true; |
|||
// this.otherFormData.requestType = 2 |
|||
this.splitFormData(this.otherFormData).then( |
|||
(resolve) => { |
|||
this.pageStatus = "success"; |
|||
this.active++; |
|||
this.loading = false; |
|||
}, |
|||
(reject) => { |
|||
this.pageStatus = "error"; |
|||
this.active++; |
|||
this.loading = false; |
|||
} |
|||
); |
|||
} |
|||
// else if (this.active == 4) { |
|||
// postCreate(this.previewFormData, 'count-plan').then(res => { |
|||
// this.pageStatus = 'success' |
|||
// this.active++ |
|||
// this.loading = false |
|||
// }).catch(err => { |
|||
// this.pageStatus = 'error' |
|||
// this.active++ |
|||
// this.loading = false |
|||
// }) |
|||
// } |
|||
else { |
|||
this.$errorMsg("请检查表单"); |
|||
} |
|||
} |
|||
}); |
|||
} |
|||
}, |
|||
}, |
|||
}; |
|||
</script> |
|||
<style lang="scss" scoped> |
|||
@import "./style/index.scss"; |
|||
</style> |
|||
<style lang="scss"> |
|||
#stepsForm{ |
|||
.formButton{ |
|||
text-align: right; |
|||
} |
|||
.searchPageComponents{ |
|||
top: 130px !important; |
|||
} |
|||
.el-dialog__wrapper{ |
|||
height: unset; |
|||
} |
|||
} |
|||
</style> |
@ -1,86 +0,0 @@ |
|||
#stepsForm { |
|||
width: 100%; |
|||
height: 100%; |
|||
display: flex; |
|||
flex-direction: column; |
|||
|
|||
::v-deep .el-steps { |
|||
padding-bottom: 15px; |
|||
|
|||
.el-step__main { |
|||
.el-step__title { |
|||
line-height: 24px; |
|||
font-size: 14px; |
|||
} |
|||
} |
|||
} |
|||
|
|||
.page1 { |
|||
flex: 1; |
|||
display: flex; |
|||
flex-direction: column; |
|||
justify-content: space-between; |
|||
} |
|||
|
|||
.page2 { |
|||
flex: 1; |
|||
overflow: hidden; |
|||
position: relative; |
|||
|
|||
::v-deep & >.el-dialog { |
|||
width: 100%; |
|||
height: 100%; |
|||
|
|||
& >.el-dialog__header { |
|||
padding: 0 !important; |
|||
} |
|||
|
|||
& > .el-dialog__body { |
|||
padding-top: 0; |
|||
} |
|||
} |
|||
} |
|||
|
|||
.page3 { |
|||
flex: 1; |
|||
display: flex; |
|||
flex-direction: column; |
|||
justify-content: space-between; |
|||
padding-bottom: 54px; |
|||
overflow: hidden; |
|||
overflow-y: auto; |
|||
|
|||
::v-deep .el-form { |
|||
flex: 1; |
|||
display: flex; |
|||
flex-direction: column; |
|||
|
|||
.el-row { |
|||
flex: 1; |
|||
flex-wrap: wrap; |
|||
overflow: hidden; |
|||
overflow-y: auto; |
|||
} |
|||
|
|||
.formTable-box { |
|||
flex: 1; |
|||
overflow: hidden; |
|||
overflow-y: auto; |
|||
|
|||
.el-form-item__content { |
|||
width: 100%; |
|||
height: 100%; |
|||
display: flex; |
|||
flex-direction: column; |
|||
margin: 0 !important; |
|||
} |
|||
} |
|||
} |
|||
::v-deep .formButton { |
|||
position: absolute; |
|||
bottom: 0; |
|||
right: 0; |
|||
z-index: 3; |
|||
} |
|||
} |
|||
} |
@ -1,459 +0,0 @@ |
|||
<template> |
|||
<el-dialog |
|||
:title="formTitle" |
|||
v-loading="loading" |
|||
v-if="displayDialog.newDialog" |
|||
:visible="true" |
|||
:fullscreen="true" |
|||
:append-to-body="false" |
|||
:modal="false" |
|||
:modal-append-to-body="false" |
|||
:show-close="false" |
|||
> |
|||
<div id="stepsForm"> |
|||
<el-steps |
|||
:active="active" |
|||
process-status="finish" |
|||
finish-status="success" |
|||
:align-center="true" |
|||
> |
|||
<el-step |
|||
v-for="(item, index) in stepFilters" |
|||
:key="index" |
|||
:title="item" |
|||
></el-step> |
|||
</el-steps> |
|||
<curren-Form |
|||
v-if="active == 0" |
|||
class="page1" |
|||
size="medium" |
|||
ref="page1" |
|||
:searchData="CreateFormData" |
|||
:searchForm="CreateForm" |
|||
:searchOptions="Options" |
|||
:searchHandle="editHandle" |
|||
:rules="Rules" |
|||
@changeInput="changeInput" |
|||
@changeSelect="changeSelect" |
|||
@push="DataPush(arguments)" |
|||
@submitForm="editFormClick(arguments)" |
|||
> |
|||
</curren-Form> |
|||
<curren-Form |
|||
v-if="active === 1" |
|||
class="page2" |
|||
size="medium" |
|||
:searchData="CreateFormData" |
|||
:searchHandle="editHandle" |
|||
:rules="Rules" |
|||
@submitForm="editFormClick(arguments)" |
|||
> |
|||
<template> |
|||
<el-form-item class="formTable-box" prop="details" v-if="active == 1"> |
|||
<div class="heder" v-if="addClick"> |
|||
<span @click="openAddNew">添加一行</span> |
|||
</div> |
|||
<currenTable |
|||
:tableData="CreateFormData.details" |
|||
:searchOptions="Options" |
|||
:tableColumns="detailsTableColumns" |
|||
:selectionTable="false" |
|||
@push="detailsDataPush(arguments)" |
|||
> |
|||
<template v-if="showDeleteButton"> |
|||
<el-table-column |
|||
label="操作" |
|||
align="center" |
|||
fixed="right" |
|||
width="100px" |
|||
> |
|||
<template slot-scope="scope"> |
|||
<div class="childTable" @click="childTable($event, scope)"> |
|||
<span>删除</span> |
|||
</div> |
|||
</template> |
|||
</el-table-column> |
|||
</template> |
|||
</currenTable> |
|||
</el-form-item> |
|||
</template> |
|||
</curren-Form> |
|||
<curren-Form |
|||
v-if="active === 2" |
|||
size="medium" |
|||
class="page3" |
|||
:searchData="previewFormData" |
|||
:searchForm="CreateForm | formData" |
|||
:searchHandle="editHandle" |
|||
:rules="Rules" |
|||
@submitForm="editFormClick(arguments)" |
|||
> |
|||
<template> |
|||
<el-form-item class="formTable-box" prop="details"> |
|||
<currenTable |
|||
:tableData="previewFormData.details" |
|||
:tableColumns="detailsTableColumns | formDataDetails" |
|||
:selectionTable="false" |
|||
> |
|||
</currenTable> |
|||
</el-form-item> |
|||
</template> |
|||
</curren-Form> |
|||
<div |
|||
v-if="active === step.length - 1 && pageStatus === 'success'" |
|||
class="page4" |
|||
> |
|||
<el-result |
|||
icon="success" |
|||
title="成功提示" |
|||
:subTitle="formTitle + '成功'" |
|||
> |
|||
<template slot="extra"> |
|||
<!-- <el-button type="primary" size="medium" @click="tuoFormPrint" |
|||
>打印托标签</el-button |
|||
> |
|||
<el-button type="primary" size="medium" @click="xbqFormPrint" |
|||
>打印箱标签</el-button |
|||
> --> |
|||
<el-button |
|||
v-for="item in successHandle" |
|||
:key="item.label" |
|||
:type="item.type" |
|||
size="medium" |
|||
@click="successClick(item.click())" |
|||
>{{ item.label }}</el-button |
|||
> |
|||
<el-button type="primary" size="medium" @click="close(1)" |
|||
>退出</el-button |
|||
> |
|||
</template> |
|||
</el-result> |
|||
</div> |
|||
<div |
|||
v-if="active === step.length - 1 && pageStatus === 'error'" |
|||
class="page4" |
|||
> |
|||
<el-result icon="error" title="错误提示" :subTitle="formTitle + '失败'"> |
|||
<template slot="extra"> |
|||
<el-button type="primary" size="medium" @click="close(1)" |
|||
>退出</el-button |
|||
> |
|||
</template> |
|||
</el-result> |
|||
</div> |
|||
</div> |
|||
</el-dialog> |
|||
</template> |
|||
<script> |
|||
import currenForm from "@/components/currenForm" |
|||
import currenTable from "@/components/currenTable" |
|||
export default { |
|||
name: 'stepsForm', |
|||
components: { |
|||
currenForm, |
|||
currenTable |
|||
}, |
|||
watch: { |
|||
active (val) { |
|||
if (val != 0) { |
|||
this.editHandle[0].label = '上一步' |
|||
} else { |
|||
this.editHandle[0].label = '取消' |
|||
} |
|||
}, |
|||
stepArray(newVal, oldVal){ |
|||
this.step = newVal |
|||
} |
|||
}, |
|||
filters: { |
|||
formData (val) { |
|||
let data = JSON.parse(JSON.stringify(val)) |
|||
val.forEach((key, index) => { |
|||
data[index].disabled = "true" |
|||
delete data[index].focus |
|||
if (key.type == "autocomplete" || key.type == "import") { |
|||
data[index].type = "input" |
|||
} |
|||
}); |
|||
return data |
|||
}, |
|||
formDataDetails (val) { |
|||
let data = JSON.parse(JSON.stringify(val)) |
|||
val.forEach((key, index) => { |
|||
data[index].disabled = true |
|||
delete data[index].focus |
|||
delete data[index].rules |
|||
if (key.type == "autocomplete" || key.type == "import") { |
|||
delete data[index].type |
|||
} else if (key.type == "objectAutocomplete") { |
|||
data[index].type = "object" |
|||
} else if (key.prop == "containerCode" && key.type == "input") { |
|||
data[index].disabled = false |
|||
} else if (key.isChange) { |
|||
// 针对第三步预览特殊情况处理 |
|||
data[index].disabled = false |
|||
} |
|||
}); |
|||
return data |
|||
} |
|||
}, |
|||
props: { |
|||
//名称 |
|||
formTitle: { |
|||
type: String, |
|||
default: '' |
|||
}, |
|||
//是否弹窗 |
|||
displayDialog: { |
|||
type: Object, |
|||
default: () => { |
|||
return { |
|||
newDialog: false |
|||
} |
|||
} |
|||
}, |
|||
//主表提交数据 |
|||
CreateFormData: { |
|||
type: Object, |
|||
default: () => { |
|||
return {} |
|||
} |
|||
}, |
|||
//主表显示form |
|||
CreateForm: { |
|||
type: Array, |
|||
default: () => { |
|||
return [] |
|||
} |
|||
}, |
|||
//预览数据 |
|||
previewFormData: { |
|||
type: Object, |
|||
default: () => { |
|||
return {} |
|||
} |
|||
}, |
|||
//检验 |
|||
Rules: { |
|||
type: Object, |
|||
default: () => { |
|||
return {} |
|||
} |
|||
}, |
|||
//下拉选择 |
|||
Options: { |
|||
type: Object, |
|||
default: () => { |
|||
return {} |
|||
} |
|||
}, |
|||
//子表table显示 |
|||
detailsTableColumns: { |
|||
type: Array, |
|||
default: () => { |
|||
return [] |
|||
} |
|||
}, |
|||
//子表提交数据 |
|||
childTableData: { |
|||
type: Array, |
|||
default: () => { |
|||
return [] |
|||
} |
|||
}, |
|||
//成功后的操作 |
|||
successHandle: { |
|||
type: Array, |
|||
default: () => { |
|||
return [] |
|||
} |
|||
}, |
|||
//步骤标题 |
|||
stepArray: { |
|||
type: Array, |
|||
default: () => { |
|||
return ["总体信息", "明细", "预览", "结果"] |
|||
} |
|||
}, |
|||
//添加一行 |
|||
addClickButton: { |
|||
type: Boolean, |
|||
default: () => { |
|||
return true |
|||
} |
|||
}, |
|||
//删除行记录 |
|||
isShowDeleteButton: { |
|||
type: Boolean, |
|||
default: () => { |
|||
return true |
|||
} |
|||
} |
|||
}, |
|||
computed: { |
|||
stepFilters () { |
|||
let stepFilters = [] |
|||
const routeName = this.$route.meta.title |
|||
this.step.forEach(key => { |
|||
stepFilters.push(routeName.concat(key)) |
|||
}) |
|||
return stepFilters |
|||
}, |
|||
}, |
|||
data () { |
|||
return { |
|||
active: 0, |
|||
formReveal: 1, |
|||
activeStep: 1, |
|||
pageStatus: '', |
|||
addClick: this.addClickButton, |
|||
showDeleteButton: this.isShowDeleteButton, |
|||
loading: false, |
|||
session: null, |
|||
step: this.stepArray, |
|||
editHandle: [ |
|||
{ label: "取消", name: "cancel" }, |
|||
{ label: "下一步", type: "primary", name: "determine" }, |
|||
], |
|||
} |
|||
}, |
|||
mounted () { |
|||
this.session = JSON.parse(JSON.stringify(this.CreateFormData)) |
|||
}, |
|||
methods: { |
|||
//结束退出 |
|||
close (val) { |
|||
this.active = 0 |
|||
// const pageRef = this.Refs[1] |
|||
const data = JSON.parse(JSON.stringify(this.session)) |
|||
this.$emit('close', data, val) |
|||
}, |
|||
//autoComplete主表 |
|||
DataPush (val) { |
|||
this.$emit("DataPush", val) |
|||
}, |
|||
//autoComplete子表 |
|||
detailsDataPush (val) { |
|||
this.$emit("detailsDataPush", val) |
|||
}, |
|||
// //打印托标签 |
|||
// tuoFormPrint () { |
|||
// this.$emit('tuoFormPrint') |
|||
// }, |
|||
// //打印箱标签 |
|||
// xbqFormPrint () { |
|||
// this.$emit('xbqFormPrint') |
|||
// }, |
|||
successClick (val) { |
|||
this.loading = true |
|||
val.then(res => { |
|||
this.loading = false |
|||
}, reason => { |
|||
this.loading = false |
|||
}) |
|||
}, |
|||
editFormClick (val) { |
|||
// Moment(this.CreateFormData.arriveTime).format() |
|||
if (val[0] == 0) { |
|||
if (this.active == 0) { |
|||
// debugger |
|||
// this.active = '' |
|||
this.close(0) |
|||
} else { |
|||
if (this.active == 2) { |
|||
this.active = this.active - this.activeStep |
|||
} else { |
|||
this.active-- |
|||
} |
|||
} |
|||
} else { |
|||
val[1].validate((valid) => { |
|||
if (valid) { |
|||
const parent = this.$parent |
|||
if (this.active < this.step.length - 1) { |
|||
this.loading = true |
|||
if (this.active == this.step.length - 2) { |
|||
parent.stepsSubmit().then(res => { |
|||
if (res == '质检校验返回') { |
|||
this.loading = false |
|||
} else { |
|||
this.pageStatus = 'success' |
|||
this.active++ |
|||
this.loading = false |
|||
} |
|||
}, reason => { |
|||
this.pageStatus = 'error' |
|||
this.active++ |
|||
this.loading = false |
|||
}).catch(err=>{ |
|||
this.loading = false |
|||
}) |
|||
} else if (this.active == this.step.length - 3) { |
|||
parent.PalletlFunction().then(res => { |
|||
// 针对特殊环境 跳过步骤 直接到最后完成 |
|||
if (res == '质检任务跳过详情') { |
|||
parent.stepsSubmit().then(res => { |
|||
this.pageStatus = 'success' |
|||
this.active = this.active + 2 |
|||
this.loading = false |
|||
}, reason => { |
|||
this.pageStatus = 'error' |
|||
this.active = this.active + 2 |
|||
this.loading = false |
|||
}).catch(err=>{ |
|||
this.loading = false |
|||
}) |
|||
} else { |
|||
this.active++ |
|||
} |
|||
this.loading = false |
|||
}, reason => { |
|||
this.loading = false |
|||
}).catch(err=>{ |
|||
this.loading = false |
|||
}) |
|||
} else { |
|||
parent.stepsHandelOne().then(res => { |
|||
if (res) { |
|||
this.addClick = res.open |
|||
this.active = this.active + res.index |
|||
this.activeStep = res.index |
|||
} else { |
|||
this.activeStep = 1 |
|||
this.active++ |
|||
} |
|||
this.loading = false |
|||
}, reason => { |
|||
this.loading = false |
|||
}).catch(err=>{ |
|||
this.loading = false |
|||
}) |
|||
} |
|||
} |
|||
} else { |
|||
this.$errorMsg('请检查表单') |
|||
} |
|||
}) |
|||
} |
|||
}, |
|||
//添加子表 |
|||
openAddNew () { |
|||
const parent = this.$parent |
|||
parent.openAddNew() |
|||
}, |
|||
childTable (e, val) { |
|||
const parent = this.$parent |
|||
parent.childTable(e, val) |
|||
}, |
|||
changeInput(prop,val){ |
|||
this.$emit("changeInput", prop, val) |
|||
}, |
|||
changeSelect(prop,val){ |
|||
this.$emit("changeSelect", prop, val) |
|||
}, |
|||
} |
|||
} |
|||
</script> |
|||
<style lang="scss" scoped> |
|||
@import "./style/index.scss"; |
|||
</style> |
@ -1,551 +0,0 @@ |
|||
<template> |
|||
<el-dialog |
|||
:title="formTitle" |
|||
v-loading="loading" |
|||
v-if="displayDialog.newDialog" |
|||
:visible="true" |
|||
:fullscreen="true" |
|||
:append-to-body="false" |
|||
:modal="false" |
|||
:modal-append-to-body="false" |
|||
:show-close="false" |
|||
> |
|||
<div id="stepsForm"> |
|||
<el-steps |
|||
:active="active" |
|||
process-status="finish" |
|||
finish-status="success" |
|||
:align-center="true" |
|||
> |
|||
<el-step |
|||
v-for="(item, index) in stepFilters" |
|||
:key="index" |
|||
:title="item" |
|||
></el-step> |
|||
</el-steps> |
|||
<curren-Form |
|||
v-if="active == 0" |
|||
class="page1" |
|||
size="medium" |
|||
ref="page1" |
|||
:searchData="CreateFormData" |
|||
:searchForm="CreateForm" |
|||
:searchOptions="Options" |
|||
:searchHandle="editHandle" |
|||
:rules="Rules" |
|||
@changeInput="changeInput" |
|||
@changeSelect="changeSelect" |
|||
@push="DataPush(arguments)" |
|||
@submitForm="editFormClick(arguments)" |
|||
> |
|||
</curren-Form> |
|||
<curren-Form |
|||
v-if="active === 1" |
|||
class="page2" |
|||
size="medium" |
|||
:searchData="CreateFormData" |
|||
:searchHandle="editHandle" |
|||
:rules="Rules" |
|||
@submitForm="editFormClick(arguments)" |
|||
> |
|||
<template> |
|||
<el-form-item class="formTable-box" prop="details" v-if="active == 1"> |
|||
<div class="heder"> |
|||
<el-button |
|||
v-if="addClick" |
|||
type="primary" |
|||
@click="openAddNew" |
|||
icon="el-icon-plus" |
|||
size="mini" |
|||
>添加一行</el-button> |
|||
|
|||
<el-button |
|||
v-if="importFormButton" |
|||
type="success" |
|||
icon="el-icon-download" |
|||
@click="openImportForm" |
|||
size="mini" |
|||
>导入</el-button> |
|||
</div> |
|||
<currenTable |
|||
:tableData="CreateFormData.details" |
|||
:searchOptions="Options" |
|||
:tableColumns="detailsTableColumns" |
|||
:selectionTable="false" |
|||
@push="detailsDataPush(arguments)" |
|||
> |
|||
<template v-if="showDeleteButton"> |
|||
<el-table-column |
|||
label="操作" |
|||
align="center" |
|||
fixed="right" |
|||
width="100px" |
|||
> |
|||
<template slot-scope="scope"> |
|||
<div class="childTable" @click="childTable($event, scope)"> |
|||
<span>删除</span> |
|||
</div> |
|||
</template> |
|||
</el-table-column> |
|||
</template> |
|||
</currenTable> |
|||
</el-form-item> |
|||
</template> |
|||
</curren-Form> |
|||
<curren-Form |
|||
v-if="active === 2" |
|||
size="medium" |
|||
class="page3" |
|||
:searchData="previewFormData" |
|||
:searchForm="CreateForm | formData" |
|||
:searchHandle="editHandle" |
|||
:rules="Rules" |
|||
@submitForm="editFormClick(arguments)" |
|||
> |
|||
<template> |
|||
<el-form-item class="formTable-box" prop="details"> |
|||
<currenTable |
|||
:tableData="previewFormData.details" |
|||
:tableColumns="detailsTableColumns | formDataDetails" |
|||
:selectionTable="false" |
|||
> |
|||
<template v-if="showPreviewFormDeleteButton"> |
|||
<el-table-column |
|||
label="操作" |
|||
align="center" |
|||
fixed="right" |
|||
width="100px" |
|||
> |
|||
<template slot-scope="scope"> |
|||
<div @click="previewChildRemove($event, scope)"> |
|||
<span style="color:red">删除</span> |
|||
</div> |
|||
</template> |
|||
</el-table-column> |
|||
</template> |
|||
</currenTable> |
|||
</el-form-item> |
|||
</template> |
|||
</curren-Form> |
|||
<div |
|||
v-if="active === step.length - 1 && pageStatus === 'success'" |
|||
class="page4" |
|||
> |
|||
<el-result |
|||
icon="success" |
|||
title="成功提示" |
|||
:subTitle="formTitle + '成功'" |
|||
> |
|||
<template slot="extra"> |
|||
<!-- <el-button type="primary" size="medium" @click="tuoFormPrint" |
|||
>打印托标签</el-button |
|||
> |
|||
<el-button type="primary" size="medium" @click="xbqFormPrint" |
|||
>打印箱标签</el-button |
|||
> --> |
|||
<el-button |
|||
v-for="item in successHandle" |
|||
:key="item.label" |
|||
:type="item.type" |
|||
size="medium" |
|||
@click="successClick(item.click())" |
|||
>{{ item.label }}</el-button |
|||
> |
|||
<el-button type="primary" size="medium" @click="close(1)" |
|||
>退出</el-button |
|||
> |
|||
</template> |
|||
</el-result> |
|||
</div> |
|||
<div |
|||
v-if="active === step.length - 1 && pageStatus === 'error'" |
|||
class="page4" |
|||
> |
|||
<el-result icon="error" title="错误提示" :subTitle="formTitle + '失败'"> |
|||
<template slot="extra"> |
|||
<el-button type="primary" size="medium" @click="close(1)" |
|||
>退出</el-button |
|||
> |
|||
</template> |
|||
</el-result> |
|||
</div> |
|||
</div> |
|||
</el-dialog> |
|||
</template> |
|||
<script> |
|||
import currenForm from "@/components/currenForm" |
|||
import currenTable from "@/components/currenTable" |
|||
export default { |
|||
name: 'stepsForm', |
|||
components: { |
|||
currenForm, |
|||
currenTable |
|||
}, |
|||
watch: { |
|||
active (val) { |
|||
if (val != 0) { |
|||
this.editHandle=[ |
|||
{ label: "上一步", name: "cancel" }, |
|||
{ label: "下一步", type: "primary", name: "determine" }, |
|||
]; |
|||
} else { |
|||
if(this.hideFirstActiveCancel){ |
|||
this.editHandle=[ |
|||
{ label: "下一步", type: "primary", name: "determine" }, |
|||
]; |
|||
}else{ |
|||
this.editHandle=[ |
|||
{ label: "取消", name: "cancel" }, |
|||
{ label: "下一步", type: "primary", name: "determine" }, |
|||
]; |
|||
} |
|||
} |
|||
}, |
|||
stepArray(newVal, oldVal){ |
|||
this.step = newVal |
|||
} |
|||
}, |
|||
filters: { |
|||
formData (val) { |
|||
let data = JSON.parse(JSON.stringify(val)) |
|||
val.forEach((key, index) => { |
|||
data[index].disabled = "true" |
|||
delete data[index].focus |
|||
if (key.type == "autocomplete" || key.type == "import") { |
|||
data[index].type = "input" |
|||
} |
|||
}); |
|||
return data |
|||
}, |
|||
formDataDetails (val) { |
|||
let data = JSON.parse(JSON.stringify(val)) |
|||
val.forEach((key, index) => { |
|||
data[index].disabled = true |
|||
delete data[index].focus |
|||
delete data[index].rules |
|||
if (key.type == "autocomplete" || key.type == "import") { |
|||
delete data[index].type |
|||
} else if (key.type == "objectAutocomplete") { |
|||
data[index].type = "object" |
|||
} else if (key.prop == "containerCode" && key.type == "input") { |
|||
data[index].disabled = false |
|||
} else if (key.isChange) { |
|||
// 针对第三步预览特殊情况处理 |
|||
data[index].disabled = false |
|||
} |
|||
}); |
|||
return data |
|||
} |
|||
}, |
|||
props: { |
|||
//名称 |
|||
formTitle: { |
|||
type: String, |
|||
default: '' |
|||
}, |
|||
//是否弹窗 |
|||
displayDialog: { |
|||
type: Object, |
|||
default: () => { |
|||
return { |
|||
newDialog: false |
|||
} |
|||
} |
|||
}, |
|||
//主表提交数据 |
|||
CreateFormData: { |
|||
type: Object, |
|||
default: () => { |
|||
return {} |
|||
} |
|||
}, |
|||
//主表显示form |
|||
CreateForm: { |
|||
type: Array, |
|||
default: () => { |
|||
return [] |
|||
} |
|||
}, |
|||
//预览数据 |
|||
previewFormData: { |
|||
type: Object, |
|||
default: () => { |
|||
return {} |
|||
} |
|||
}, |
|||
//检验 |
|||
Rules: { |
|||
type: Object, |
|||
default: () => { |
|||
return {} |
|||
} |
|||
}, |
|||
//下拉选择 |
|||
Options: { |
|||
type: Object, |
|||
default: () => { |
|||
return {} |
|||
} |
|||
}, |
|||
//子表table显示 |
|||
detailsTableColumns: { |
|||
type: Array, |
|||
default: () => { |
|||
return [] |
|||
} |
|||
}, |
|||
//子表提交数据 |
|||
childTableData: { |
|||
type: Array, |
|||
default: () => { |
|||
return [] |
|||
} |
|||
}, |
|||
//成功后的操作 |
|||
successHandle: { |
|||
type: Array, |
|||
default: () => { |
|||
return [] |
|||
} |
|||
}, |
|||
//步骤标题 |
|||
stepArray: { |
|||
type: Array, |
|||
default: () => { |
|||
return ["总体信息", "明细", "预览", "结果"] |
|||
} |
|||
}, |
|||
//添加一行 |
|||
addClickButton: { |
|||
type: Boolean, |
|||
default: () => { |
|||
return true |
|||
} |
|||
}, |
|||
//导入按钮 |
|||
importFormButton: { |
|||
type: Boolean, |
|||
default: () => { |
|||
return false |
|||
} |
|||
}, |
|||
//删除行记录 |
|||
isShowDeleteButton: { |
|||
type: Boolean, |
|||
default: () => { |
|||
return true |
|||
} |
|||
}, |
|||
// 隐藏第一步骤的取消按钮 |
|||
isHideFirstActiveCancel:{ |
|||
type: Boolean, |
|||
default: () => { |
|||
return false |
|||
} |
|||
}, |
|||
// 预览视图显示删除按钮 |
|||
showPreviewFormDeleteButton:{ |
|||
type: Boolean, |
|||
default: () => { |
|||
return false |
|||
} |
|||
} |
|||
}, |
|||
computed: { |
|||
stepFilters () { |
|||
let stepFilters = [] |
|||
const routeName = this.$route.meta.title |
|||
this.step.forEach(key => { |
|||
stepFilters.push(routeName.concat(key)) |
|||
}) |
|||
return stepFilters |
|||
}, |
|||
}, |
|||
data () { |
|||
return { |
|||
active: 0, |
|||
formReveal: 1, |
|||
activeStep: 1, |
|||
pageStatus: '', |
|||
addClick: this.addClickButton,//添加一行按钮 |
|||
importForm:this.importFormButton,//导入按钮 |
|||
showDeleteButton: this.isShowDeleteButton,//操作-删除按钮 |
|||
hideFirstActiveCancel:this.isHideFirstActiveCancel,// 隐藏第一步骤的取消按钮 |
|||
loading: false, |
|||
session: null, |
|||
step: this.stepArray, |
|||
editHandle: [ |
|||
{ label: "取消", name: "cancel" }, |
|||
{ label: "下一步", type: "primary", name: "determine" }, |
|||
], |
|||
} |
|||
}, |
|||
mounted () { |
|||
this.session = JSON.parse(JSON.stringify(this.CreateFormData)) |
|||
if(this.hideFirstActiveCancel){ |
|||
this.editHandle=[ |
|||
{ label: "下一步", type: "primary", name: "determine" }, |
|||
]; |
|||
} |
|||
}, |
|||
methods: { |
|||
//结束退出 |
|||
close (val) { |
|||
this.active = 0 |
|||
// const pageRef = this.Refs[1] |
|||
const data = JSON.parse(JSON.stringify(this.session)) |
|||
this.$emit('close', data, val) |
|||
}, |
|||
//autoComplete主表 |
|||
DataPush (val) { |
|||
this.$emit("DataPush", val) |
|||
}, |
|||
//autoComplete子表 |
|||
detailsDataPush (val) { |
|||
this.$emit("detailsDataPush", val) |
|||
}, |
|||
// //打印托标签 |
|||
// tuoFormPrint () { |
|||
// this.$emit('tuoFormPrint') |
|||
// }, |
|||
// //打印箱标签 |
|||
// xbqFormPrint () { |
|||
// this.$emit('xbqFormPrint') |
|||
// }, |
|||
successClick (val) { |
|||
this.loading = true |
|||
val.then(res => { |
|||
this.loading = false |
|||
}, reason => { |
|||
this.loading = false |
|||
}).catch(err=>{ |
|||
this.loading = false |
|||
}) |
|||
}, |
|||
editFormClick (val) { |
|||
// Moment(this.CreateFormData.arriveTime).format() |
|||
// if (val[0] == 0) { |
|||
if (val[2].name == "cancel") { |
|||
if (this.active == 0) { |
|||
// debugger |
|||
// this.active = '' |
|||
this.close(0) |
|||
} else { |
|||
if (this.active == 2) { |
|||
this.active = this.active - this.activeStep |
|||
} else { |
|||
this.active-- |
|||
} |
|||
} |
|||
} else { |
|||
val[1].validate((valid) => { |
|||
if (valid) { |
|||
const parent = this.$parent |
|||
if (this.active < this.step.length - 1) { |
|||
this.loading = true |
|||
if (this.active == this.step.length - 2) { |
|||
parent.stepsSubmit().then(res => { |
|||
if (res == '质检校验返回') { |
|||
this.loading = false |
|||
} else { |
|||
this.pageStatus = 'success' |
|||
this.active++ |
|||
this.loading = false |
|||
} |
|||
}, reason => { |
|||
this.loading = false |
|||
if(reason=="return")return |
|||
this.pageStatus = 'error' |
|||
this.active++ |
|||
this.loading = false |
|||
}).catch(err=>{ |
|||
this.loading = false |
|||
}) |
|||
} else if (this.active == this.step.length - 3) { |
|||
parent.PalletlFunction().then(res => { |
|||
// 针对特殊环境 跳过步骤 直接到最后完成 |
|||
if (res == '质检任务跳过详情') { |
|||
parent.stepsSubmit().then(res => { |
|||
this.pageStatus = 'success' |
|||
this.active = this.active + 2 |
|||
this.loading = false |
|||
}, reason => { |
|||
this.pageStatus = 'error' |
|||
this.active = this.active + 2 |
|||
this.loading = false |
|||
}).catch(err=>{ |
|||
this.loading = false |
|||
}) |
|||
} else { |
|||
this.active++ |
|||
} |
|||
this.loading = false |
|||
}, reason => { |
|||
this.loading = false |
|||
}).catch(err=>{ |
|||
this.loading = false |
|||
}) |
|||
} else { |
|||
parent.stepsHandelOne().then(res => { |
|||
if (res) { |
|||
this.addClick = res.open |
|||
this.active = this.active + res.index |
|||
this.activeStep = res.index |
|||
} else { |
|||
this.activeStep = 1 |
|||
this.active++ |
|||
} |
|||
this.loading = false |
|||
}, reason => { |
|||
this.loading = false |
|||
}).catch(err=>{ |
|||
this.loading = false |
|||
}) |
|||
} |
|||
} |
|||
} else { |
|||
this.$errorMsg('请检查表单') |
|||
} |
|||
}) |
|||
} |
|||
}, |
|||
//添加子表 |
|||
openAddNew () { |
|||
const parent = this.$parent |
|||
parent.openAddNew() |
|||
}, |
|||
// 导入 |
|||
openImportForm(){ |
|||
const parent = this.$parent |
|||
parent.openImportFormHandle() |
|||
// this.displayDialog.importDialog = true |
|||
}, |
|||
childTable (e, val) { |
|||
const parent = this.$parent |
|||
parent.childTable(e, val) |
|||
}, |
|||
changeInput(prop,val){ |
|||
this.$emit("changeInput", prop, val) |
|||
}, |
|||
changeSelect(prop,val){ |
|||
this.$emit("changeSelect", prop, val) |
|||
}, |
|||
//预览步骤删除操作(第三步) |
|||
previewChildRemove(e, val) { |
|||
this.$confirm('您确定删除吗, 是否继续?', '提示', { |
|||
confirmButtonText: '确定', |
|||
cancelButtonText: '取消', |
|||
type: 'warning' |
|||
}).then(() => { |
|||
this.previewFormData.details.splice(val.$index, 1) |
|||
// this.$emit("removePreviewFormRow",this.previewFormData) |
|||
}).catch(() => { |
|||
|
|||
}); |
|||
}, |
|||
} |
|||
} |
|||
</script> |
|||
<style lang="scss" scoped> |
|||
@import "./style/index.scss"; |
|||
</style> |
@ -1,134 +0,0 @@ |
|||
#stepsForm { |
|||
width: 100%; |
|||
height: 100%; |
|||
display: flex; |
|||
flex-direction: column; |
|||
|
|||
::v-deep .el-steps { |
|||
padding-bottom: 15px; |
|||
|
|||
.el-step__main { |
|||
.el-step__title { |
|||
line-height: 24px; |
|||
font-size: 14px; |
|||
} |
|||
} |
|||
} |
|||
|
|||
.page1 { |
|||
flex: 1; |
|||
display: flex; |
|||
flex-direction: column; |
|||
justify-content: space-between; |
|||
overflow: hidden; |
|||
overflow-y: auto; |
|||
} |
|||
|
|||
.page2 { |
|||
flex: 1; |
|||
display: flex; |
|||
flex-direction: column; |
|||
justify-content: space-between; |
|||
padding-bottom: 54px; |
|||
overflow: hidden; |
|||
overflow-y: auto; |
|||
|
|||
::v-deep .el-form { |
|||
flex: 1; |
|||
display: flex; |
|||
.el-row { |
|||
display: none; |
|||
} |
|||
|
|||
.formTable-box { |
|||
flex: 1; |
|||
overflow: hidden; |
|||
overflow-y: auto; |
|||
|
|||
.el-form-item__content { |
|||
width: 100%; |
|||
height: 100%; |
|||
display: flex; |
|||
flex-direction: column; |
|||
margin: 0 !important; |
|||
|
|||
.heder { |
|||
padding: 5px 0; |
|||
text-align: center; |
|||
font-size: 18px; |
|||
|
|||
button{ |
|||
margin: 0 10px; |
|||
} |
|||
} |
|||
|
|||
.el-table { |
|||
flex: 1; |
|||
|
|||
.childTable { |
|||
display: flex; |
|||
justify-content: space-around; |
|||
|
|||
span { |
|||
cursor: pointer; |
|||
|
|||
&:nth-child(1) { |
|||
color: red; |
|||
} |
|||
|
|||
&:nth-child(2) { |
|||
color: green; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
} |
|||
} |
|||
} |
|||
|
|||
::v-deep .formButton { |
|||
position: absolute; |
|||
bottom: 0; |
|||
right: 0; |
|||
z-index: 3; |
|||
} |
|||
} |
|||
|
|||
.page3 { |
|||
flex: 1; |
|||
display: flex; |
|||
flex-direction: column; |
|||
padding-bottom: 54px; |
|||
overflow: hidden; |
|||
overflow-y: auto; |
|||
|
|||
::v-deep .el-form { |
|||
flex: 1; |
|||
display: flex; |
|||
flex-direction: column; |
|||
|
|||
.el-row { |
|||
flex: 1; |
|||
flex-wrap: wrap; |
|||
} |
|||
|
|||
.formTable-box { |
|||
flex: 1; |
|||
|
|||
.el-form-item__content { |
|||
width: 100%; |
|||
height: 100%; |
|||
display: flex; |
|||
flex-direction: column; |
|||
margin: 0 !important; |
|||
} |
|||
} |
|||
} |
|||
::v-deep .formButton { |
|||
position: absolute; |
|||
bottom: 0; |
|||
right: 0; |
|||
z-index: 3; |
|||
} |
|||
} |
|||
} |
@ -1,720 +0,0 @@ |
|||
<template> |
|||
<el-drawer |
|||
v-loading="DrawerLoading" |
|||
v-if="drawer" |
|||
:visible="true" |
|||
:close-on-press-escape="false" |
|||
:wrapperClosable="false" |
|||
:with-header="false" |
|||
:modal="false" |
|||
size="100%" |
|||
> |
|||
<div class="drawer-heder"> |
|||
<div class="heder-left"> |
|||
<!-- <div class="heder-img"> |
|||
<img |
|||
src="@/assets/img/drawerHeader.png" |
|||
alt="" |
|||
style="width: 100%; height: 100%" |
|||
/> |
|||
</div> --> |
|||
<div class="header-text"> |
|||
<span>{{ propsData[title[0].prop] }}</span> |
|||
<span>{{ title[0].label }}</span> |
|||
</div> |
|||
</div> |
|||
<div class="heder-right"> |
|||
<curren-Button |
|||
:Butttondata="Butttondata" |
|||
@tableButtonClick="tableButtonClick" |
|||
> |
|||
<template> |
|||
<el-dropdown |
|||
trigger="click" |
|||
@command="handleCommand" |
|||
v-if="JSON.stringify(dropdownData) != '{}'" |
|||
> |
|||
<el-button size="mini" icon="el-icon-more"></el-button> |
|||
<el-dropdown-menu slot="dropdown"> |
|||
<el-dropdown-item |
|||
v-for="(item, index) in dropdownData" |
|||
:key="index" |
|||
:command="item.command" |
|||
>{{ item.label }}</el-dropdown-item |
|||
> |
|||
</el-dropdown-menu> |
|||
</el-dropdown> |
|||
</template> |
|||
</curren-Button> |
|||
</div> |
|||
</div> |
|||
<div class="drawer-main"> |
|||
<curren-tabs |
|||
:tabsData="dropdownTabs" |
|||
:activeName="firstTabs" |
|||
type="border-card" |
|||
@handleClick="handleClick" |
|||
> |
|||
<template slot-scope="scope"> |
|||
<curren-descriptions |
|||
border |
|||
v-if="scope.value == 'xq'" |
|||
:column="column" |
|||
:direction="direction" |
|||
:colon="false" |
|||
:tabsDesTions="tabsDesTions" |
|||
:propsData="propsData" |
|||
> |
|||
</curren-descriptions> |
|||
<!-- 明细头部按钮 --> |
|||
<div |
|||
class="currenTabel-drawer-mx-header" |
|||
v-if="scope.value == 'mx' && (showDetailColumnsSet || showDetailFilters)" |
|||
> |
|||
<curren-Button |
|||
:Butttondata="detailHeaderButton" |
|||
@tableButtonClick="detailHeaderClick" |
|||
></curren-Button> |
|||
</div> |
|||
<!-- 字段设置弹窗 --> |
|||
<rowDrop |
|||
@radio="rowDrop" |
|||
:tableColumns="tableColumns" |
|||
:visible="rowDropVisible" |
|||
@closeRowDrop="closeRowDrop" |
|||
:source="'detail_api'" |
|||
:innerMaxHeight="'calc(90vh - 400px)'" |
|||
></rowDrop> |
|||
<!-- 全面搜索(普通+高级整合) --> |
|||
<searchOverall |
|||
ref="searchOverallRef" |
|||
class="detailFiltersPopPage" |
|||
:showSearchOverall="detailFiltersVisible" |
|||
@getShowSearchOverall="getShowSearchOverall" |
|||
:showMoreSearch="true" |
|||
:tableColumns="tableColumns" |
|||
@overallSearchFormClick="detailFiltersSearch" |
|||
:filterActionOptions="filterActionOptions" |
|||
:httpOverallSearchData="detailSearchDataFE" |
|||
:disabledAction="true" |
|||
:disabledLogic="true" |
|||
> |
|||
<!-- 插槽预留 --> |
|||
<slot name="searchPrimarySlot"></slot> |
|||
</searchOverall> |
|||
<!-- currenTableDetails 组件 明细中带分页功能 --> |
|||
<umyTable |
|||
v-if="scope.value == 'mx'" |
|||
:isUpdate="isUpdate" |
|||
:tableBorder="true" |
|||
:tableData="propsData.details" |
|||
:propsData="propsData" |
|||
:tableColumns="tableColumns" |
|||
:selectionTable="selectionTable" |
|||
:requiredRules="false" |
|||
:setUTableHeight="showDetailColumnsSet ? 300 : 260" |
|||
@sortChange="sortChange" |
|||
@handleSelectionChange="handleSelectionChange" |
|||
@inlineDialog="inlineDialog" |
|||
@buttonClick="buttonClick" |
|||
:buttonOperationList_left="buttonOperationList_left" |
|||
@buttonOperationClick_left="buttonOperationClick_left" |
|||
> |
|||
<template> |
|||
<slot></slot> |
|||
</template> |
|||
</umyTable> |
|||
<!-- 明细页码 --> |
|||
<pagination |
|||
v-if="scope.value == 'mx'" |
|||
:totalCount="totalCount" |
|||
:pagesizeProps="MaxResultCount" |
|||
@SizeChange="alterResultCountDetails" |
|||
@CurrentChange="alertoldSkipCountDetails" |
|||
:currentPageProps="currentPage" |
|||
></pagination> |
|||
<!-- 新增汇总 表头 区分明细表头使用 summaryTableColumns --> |
|||
<umyTable |
|||
v-if="scope.value == 'hz'" |
|||
:tableBorder="true" |
|||
:tableData="propsData.summaryDetails" |
|||
:tableColumns="summaryTableColumns.length == 0 ? tableColumns : summaryTableColumns" |
|||
:selectionTable="selectionTable" |
|||
:requiredRules="false" |
|||
@sortChange="sortChange" |
|||
@handleSelectionChange="handleSelectionChange" |
|||
@inlineDialog="inlineDialog" |
|||
@buttonClick="buttonClick" |
|||
:setUTableHeight="210" |
|||
> |
|||
<template> |
|||
<slot></slot> |
|||
</template> |
|||
</umyTable> |
|||
<!-- 自定义扩展 --> |
|||
<umyTable |
|||
v-if=" |
|||
scope.value == zdyValue && |
|||
scope.value != 'xq' && |
|||
scope.value != 'mx' && |
|||
scope.value != 'hz' && |
|||
scope.value != 'zwlcj' |
|||
" |
|||
:tableBorder="true" |
|||
:tableLoading="tableLoading" |
|||
:tableData="otherData" |
|||
:tableColumns="zdyTableColumns" |
|||
:selectionTable="selectionTable" |
|||
:requiredRules="false" |
|||
@sortChange="sortChange" |
|||
@handleSelectionChange="handleSelectionChange" |
|||
@inlineDialog="inlineDialog" |
|||
@buttonClick="buttonClick" |
|||
:setUTableHeight="210" |
|||
> |
|||
<template> |
|||
<slot></slot> |
|||
</template> |
|||
</umyTable> |
|||
<!-- 自定义扩展(tree)的形式 目前使用位置:物品清单信息-子物品层级 todo:待优化--> |
|||
<currenTable |
|||
v-if=" |
|||
scope.value == zdyValue && |
|||
scope.value == 'zwlcj' |
|||
" |
|||
:tableLoading="tableLoading" |
|||
:tableData="otherData" |
|||
:tableColumns="zdyTableColumns" |
|||
:selectionTable="selectionTable" |
|||
:requiredRules="false" |
|||
@sortChange="sortChange" |
|||
@handleSelectionChange="handleSelectionChange" |
|||
@inlineDialog="inlineDialog" |
|||
:treeProps="{children: 'children', hasChildren: 'hasChildren'}" |
|||
@buttonClick="buttonClick" |
|||
> |
|||
<template> |
|||
<slot></slot> |
|||
</template> |
|||
</currenTable> |
|||
</template> |
|||
</curren-tabs> |
|||
</div> |
|||
<div class="drawer-Shut" @click="drawerShut"> |
|||
<el-button type="danger" size="mini">关闭</el-button> |
|||
</div> |
|||
<!-- 明细-查看详情 --> |
|||
<el-dialog |
|||
width="90%" |
|||
:modal-append-to-body="false" |
|||
:append-to-body="false" |
|||
:title="detailInfoTitle" |
|||
:visible.sync="displayDialog.detailInfoDialog" |
|||
:show-close="true" |
|||
> |
|||
<div> |
|||
<curren-descriptions |
|||
v-if="detailInfoTableData" |
|||
border |
|||
:column="column" |
|||
:direction="direction" |
|||
:colon="false" |
|||
:tabsDesTions="tableColumns" |
|||
:propsData="detailInfoTableData" |
|||
style="padding-bottom: 20px;" |
|||
></curren-descriptions> |
|||
</div> |
|||
</el-dialog> |
|||
</el-drawer> |
|||
</template> |
|||
<script> |
|||
import searchOverall from "@/components/searchOverall" |
|||
import { getListByItemcode,byItem,byProduct,byComponent,bySupplierCode,byLocation,byLocationCode, |
|||
relationByLocationCode,byComponentCJ,purRecNoteCustomInfo,EnumPurchaseReceiptInspect |
|||
} from "@/api/wms-api" |
|||
import currenButton from "@/components/currenButton" |
|||
import currenDescriptions from "@/components/currenDescriptions" |
|||
import currenTabs from "@/components/currenTabs" |
|||
import currenTable from "@/components/currenTable" |
|||
import pagination from "@/components/Pagination" |
|||
import rowDrop from "@/components/rowDrop/index.vue" |
|||
import { getParentNode } from '@/utils' |
|||
import * as allUrlOption from '@/utils/baseData/urlOption' |
|||
import { LoadingMixins } from "@/mixins/LoadingMixins"; |
|||
export default { |
|||
name: 'currenTabel-drawer', |
|||
components: { |
|||
pagination, |
|||
currenButton, |
|||
currenDescriptions, |
|||
currenTabs, |
|||
currenTable, |
|||
searchOverall, |
|||
rowDrop |
|||
}, |
|||
mixins: [ |
|||
LoadingMixins, |
|||
], |
|||
props: { |
|||
// 操作列按钮 |
|||
buttonOperationList_left:{ |
|||
type: Array, |
|||
default: null, |
|||
}, |
|||
// 是否显示明细-字段设置 |
|||
showDetailColumnsSet:{ |
|||
type: Boolean, |
|||
default: true |
|||
}, |
|||
// 是否显示明细-筛选 |
|||
showDetailFilters:{ |
|||
type: Boolean, |
|||
default: true |
|||
}, |
|||
// 明细-筛选-当前接口中的筛选数据(用于同步全面筛选的数据) |
|||
detailSearchDataFE:{ |
|||
type: Object, |
|||
default: null |
|||
}, |
|||
title: { |
|||
type: Array, |
|||
default: () => { |
|||
return [] |
|||
} |
|||
}, |
|||
DrawerLoading: { |
|||
type: Boolean, |
|||
default: true |
|||
}, |
|||
drawer: { |
|||
type: Boolean, |
|||
default: false |
|||
}, |
|||
dropdownData: { |
|||
type: Object, |
|||
default: () => { |
|||
return {} |
|||
} |
|||
}, |
|||
propsData: { |
|||
type: Object, |
|||
default: () => { |
|||
return {} |
|||
} |
|||
}, |
|||
tabsDesTions: { |
|||
type: Array, |
|||
default: () => { |
|||
return [] |
|||
} |
|||
}, |
|||
dropdownTabsData: { |
|||
type: Array, |
|||
default: () => { |
|||
return [] |
|||
} |
|||
}, |
|||
tableLoading: { |
|||
type: Boolean, |
|||
default: false |
|||
}, |
|||
tableColumns: { |
|||
type: Array, |
|||
default: () => { |
|||
return [] |
|||
} |
|||
}, |
|||
summaryTableColumns: { |
|||
type: Array, |
|||
default: () => { |
|||
return [] |
|||
} |
|||
}, |
|||
Butttondata: { |
|||
type: Array, |
|||
default: () => { |
|||
return [{ |
|||
type: 'warning', |
|||
icon: 'el-icon-edit', |
|||
label: '编辑', |
|||
name: 'edit', |
|||
size: 'mini' |
|||
}] |
|||
} |
|||
}, |
|||
selectionTable: { |
|||
type: Boolean, |
|||
default: false |
|||
}, |
|||
MaxResultCount: { |
|||
type: Number, |
|||
default: 0 |
|||
}, |
|||
totalCount: { |
|||
type: Number, |
|||
default: 0 |
|||
}, |
|||
currentPage: { |
|||
type: Number, |
|||
default: 0 |
|||
}, |
|||
// 详情展现列数,默认为2列展现 |
|||
column: { |
|||
type: Number, |
|||
default: 2 |
|||
}, |
|||
// 详情展示方式,默认水平分布 |
|||
direction: { |
|||
type: String, |
|||
default: 'horizontal' |
|||
}, |
|||
// 详情tabs排序默认 |
|||
firstTabs: { |
|||
type: String, |
|||
default: 'xq' |
|||
} |
|||
|
|||
}, |
|||
computed: { |
|||
dropdownTabs () { |
|||
// 带有特殊扩展tabs页的 |
|||
if (this.dropdownTabsData.length !== 0) { |
|||
return this.dropdownTabsData |
|||
} else { |
|||
// 正常普通 详情,明细,汇总 |
|||
// if (Object.keys(this.propsData).length != 0) { |
|||
if (Object.keys(this.propsData)) { |
|||
this.initDropdownTabsData = [{ |
|||
label: "详情", |
|||
name: 'xq' |
|||
}] |
|||
// 明细可以为空数组,前端分页使用 |
|||
if(this.propsData.details){ |
|||
this.initDropdownTabsData.push({ |
|||
label: "明细", |
|||
name: 'mx' |
|||
}) |
|||
} |
|||
if(this.propsData.summaryDetails && this.propsData.summaryDetails.length > 0){ |
|||
this.initDropdownTabsData.push({ |
|||
label: "汇总", |
|||
name: 'hz' |
|||
}) |
|||
} |
|||
} |
|||
return this.initDropdownTabsData |
|||
} |
|||
}, |
|||
}, |
|||
mounted () { |
|||
this.initDetailHeaderButton() |
|||
// 点击外部,字段设置弹窗隐藏 |
|||
document.addEventListener('click',(e)=>{ |
|||
if(!this.rowDropVisible)return |
|||
let _class = "rowDropNotHideItem" |
|||
let _hasParent = getParentNode(e.target,_class) |
|||
let _current_class = e.target._prevClass || e.target.className |
|||
let _hasCurrent = _current_class ? String(_current_class).includes(_class) : false |
|||
if(!_hasParent && !_hasCurrent){ |
|||
this.closeRowDrop() |
|||
} |
|||
}) |
|||
}, |
|||
data () { |
|||
return { |
|||
detailHeaderButton:null,//明细-上方按钮 |
|||
detailInfoTableData:null,//明细-查看详情弹窗数据 |
|||
detailInfoTitle:null,//明细-查看详情弹窗title |
|||
// table 重新渲染所需key |
|||
isUpdate: false, |
|||
// 明细-字段设置是否显示 |
|||
rowDropVisible: false, |
|||
otherData:[], // 切换tabs页赋值 |
|||
zdyTableColumns:[], // 自定义表头 |
|||
zdyValue:'', // 自定义展现值 |
|||
// firstTabs:'xq', |
|||
initDropdownTabsData:[ |
|||
{ |
|||
label: "详情", |
|||
name: 'xq' |
|||
}, |
|||
{ |
|||
label: "明细", |
|||
name: 'mx' |
|||
}, |
|||
{ |
|||
label: "汇总", |
|||
name: 'hz' |
|||
} |
|||
], |
|||
detailFiltersVisible:false,//筛选显示 |
|||
filterActionOptions:[{ |
|||
value: '==', |
|||
label: '等于' |
|||
}, { |
|||
value: '!=', |
|||
label: '不等于' |
|||
}], |
|||
} |
|||
}, |
|||
methods: { |
|||
// 初始化明细-上方按钮 |
|||
initDetailHeaderButton(){ |
|||
this.detailHeaderButton = [] |
|||
if(this.showDetailColumnsSet){this.detailHeaderButton.push(this.defaultFieldSettingBtn())} |
|||
if(this.showDetailFilters){this.detailHeaderButton.push(this.defaultFilterBtn())} |
|||
}, |
|||
detailHeaderClick(val,item){ |
|||
// 字段设置 |
|||
if(val == 'field'){ |
|||
this.columnsSettingHandle() |
|||
} |
|||
// 筛选 |
|||
if(val == 'filter'){ |
|||
this.detailFiltersHandle() |
|||
} |
|||
}, |
|||
// 关闭明细-详情弹窗 |
|||
closeDetailInfo(val){ |
|||
this.displayDialog.detailInfoDialog = val || false |
|||
}, |
|||
// 明细-操作列事件 |
|||
buttonOperationClick_left(row, item, index){ |
|||
// 查看详情 |
|||
if(item.name == "info"){ |
|||
this.displayDialog.detailInfoDialog = true |
|||
this.detailInfoTableData = row |
|||
let _name = allUrlOption[this.$route.name].detailInfoName |
|||
this.detailInfoTitle = _name ? row[_name] + ' 详情' : '详情' |
|||
} |
|||
this.$emit('buttonOperationClick_left',row, item, index) |
|||
}, |
|||
rowDrop(data,type) { |
|||
this.$emit('rowDrop',data,type) |
|||
this.isUpdate = !this.isUpdate |
|||
}, |
|||
// 明细-字段设置 |
|||
columnsSettingHandle(){ |
|||
this.rowDropVisible = !this.rowDropVisible |
|||
}, |
|||
// 明细-筛选 |
|||
detailFiltersHandle(){ |
|||
this.detailFiltersVisible = !this.detailFiltersVisible |
|||
}, |
|||
// 明细-全面筛选组件内部显示/隐藏更改触发,同步当前的showSearchOverall值 |
|||
getShowSearchOverall(val){ |
|||
this.detailFiltersVisible = val || false |
|||
}, |
|||
// 明细-全面筛选所有按钮操作集 |
|||
detailFiltersSearch(options){ |
|||
this.$emit('detailFiltersSearch', options) |
|||
}, |
|||
// 明细-关闭字段设置 |
|||
closeRowDrop() { |
|||
this.rowDropVisible = false |
|||
}, |
|||
handleCommand (command) { |
|||
this.$emit('handleCommand', command) |
|||
}, |
|||
drawerShut () { |
|||
this.closeDetailInfo(false) |
|||
this.$emit('drawerShut', false) |
|||
}, |
|||
tableButtonClick (val) { |
|||
this.$emit('drawerbutton', val) |
|||
}, |
|||
//排序 |
|||
sortChange (data) { |
|||
this.$emit('sortChange', data) |
|||
}, |
|||
//点击selection框 |
|||
handleSelectionChange (val) { |
|||
this.$emit("handleSelectionChange", val) |
|||
}, |
|||
//点击name提交emit打开编辑页面 |
|||
inlineDialog (row) { |
|||
this.$emit("inlineDialog", row) |
|||
}, |
|||
//接收分页组件emit改变每页最大页数 |
|||
alterResultCountDetails (val) { |
|||
this.$emit('alterResultCountDetails', val) |
|||
}, |
|||
//接收分页组件emit改变当前页 |
|||
alertoldSkipCountDetails (val) { |
|||
this.$emit('alertoldSkipCountDetails', val) |
|||
}, |
|||
buttonClick(row) { |
|||
this.$emit("buttonClick", row); |
|||
}, |
|||
// tabs 切换页 |
|||
handleClick (val) { |
|||
this.$emit("currenTabsChange", val);//父级获取当前的tab内容 |
|||
this.zdyValue = val.name |
|||
this.dropdownTabsData.forEach( item => { |
|||
if (item.name == val.name) { |
|||
let parent = this.$parent |
|||
parent.tableLoading = true |
|||
// 详情 明细 汇总 |
|||
parent.firstTabs = val.name |
|||
if (val.name == 'xq' || val.name == 'mx' || val.name == 'hz') { |
|||
this.zdyTableColumns = [] |
|||
this.otherData = [] |
|||
parent.tableLoading = false |
|||
} else { |
|||
this.zdyTableColumns = [] |
|||
this.otherData = [] |
|||
// this.firstTabs = val.name |
|||
// 其他自定义tab页 |
|||
if (item.functionName == 'getListByItemcode') { |
|||
let params = { |
|||
itemCode: this.propsData.code |
|||
} |
|||
getListByItemcode(params, item.url).then(res => { |
|||
let zdyTableColumnsJSON = JSON.parse(JSON.stringify(this.$isTableColumns[item.tableColumns])); |
|||
delete zdyTableColumnsJSON[0].type |
|||
this.zdyTableColumns = zdyTableColumnsJSON |
|||
this.otherData = res |
|||
parent.tableLoading = false |
|||
}).catch(err => { |
|||
console.log(err) |
|||
parent.tableLoading = false |
|||
}) |
|||
} else if (item.functionName == 'byItem') { |
|||
byItem(this.propsData.code, item.url).then(res => { |
|||
let zdyTableColumnsJSON = JSON.parse(JSON.stringify(this.$isTableColumns[item.tableColumns])); |
|||
delete zdyTableColumnsJSON[0].type |
|||
this.zdyTableColumns = zdyTableColumnsJSON |
|||
this.otherData = res |
|||
parent.tableLoading = false |
|||
}).catch(err => { |
|||
console.log(err) |
|||
parent.tableLoading = false |
|||
}) |
|||
} else if (item.functionName == 'byProduct') { |
|||
byProduct({product:this.propsData.product}, item.url).then(res => { |
|||
let zdyTableColumnsJSON = JSON.parse(JSON.stringify(this.$isTableColumns[item.tableColumns])); |
|||
delete zdyTableColumnsJSON[0].type |
|||
this.zdyTableColumns = zdyTableColumnsJSON |
|||
this.otherData = res |
|||
parent.tableLoading = false |
|||
}).catch(err => { |
|||
console.log(err) |
|||
parent.tableLoading = false |
|||
}) |
|||
} else if (item.functionName == 'byComponent') { |
|||
byComponent({component:this.propsData.component}, item.url).then(res => { |
|||
let zdyTableColumnsJSON = JSON.parse(JSON.stringify(this.$isTableColumns[item.tableColumns])); |
|||
delete zdyTableColumnsJSON[0].type |
|||
this.zdyTableColumns = zdyTableColumnsJSON |
|||
this.otherData = res |
|||
parent.tableLoading = false |
|||
}).catch(err => { |
|||
console.log(err) |
|||
parent.tableLoading = false |
|||
}) |
|||
} |
|||
// 基础数据管理-物品清单维护-物品清单信息-详情-子物品层级 |
|||
else if (item.functionName == 'byComponentCJ') { |
|||
this.otherData = [] |
|||
byComponentCJ({component:this.propsData.component}, item.url).then(res => { |
|||
let zdyTableColumnsJSON = JSON.parse(JSON.stringify(this.$isTableColumns[item.tableColumns])); |
|||
delete zdyTableColumnsJSON[0].type |
|||
this.zdyTableColumns = zdyTableColumnsJSON |
|||
this.otherData = res |
|||
this.recursion(this.otherData) |
|||
parent.tableLoading = false |
|||
}).catch(err => { |
|||
console.log(err) |
|||
parent.tableLoading = false |
|||
}) |
|||
} else if (item.functionName == 'bySupplierCode') { |
|||
bySupplierCode({supplierCode:this.propsData.code}, item.url).then(res => { |
|||
let zdyTableColumnsJSON = JSON.parse(JSON.stringify(this.$isTableColumns[item.tableColumns])); |
|||
delete zdyTableColumnsJSON[0].type |
|||
this.zdyTableColumns = zdyTableColumnsJSON |
|||
this.otherData = res |
|||
parent.tableLoading = false |
|||
}).catch(err => { |
|||
console.log(err) |
|||
parent.tableLoading = false |
|||
}) |
|||
} else if (item.functionName == 'byLocation') { |
|||
byLocation(this.propsData.code==null?this.propsData.locationCode:this.propsData.code, item.url).then(res => { |
|||
let zdyTableColumnsJSON = JSON.parse(JSON.stringify(this.$isTableColumns[item.tableColumns])); |
|||
delete zdyTableColumnsJSON[0].type |
|||
this.zdyTableColumns = zdyTableColumnsJSON |
|||
this.otherData = res |
|||
this.o |
|||
parent.tableLoading = false |
|||
}).catch(err => { |
|||
console.log(err) |
|||
parent.tableLoading = false |
|||
}) |
|||
} else if (item.functionName == 'byLocationCode') { |
|||
byLocationCode({locationCode: this.propsData.code}, item.url).then(res => { |
|||
let itemData = [] |
|||
itemData.push(res) |
|||
let zdyTableColumnsJSON = JSON.parse(JSON.stringify(this.$isTableColumns[item.tableColumns])); |
|||
delete zdyTableColumnsJSON[0].type |
|||
this.zdyTableColumns = zdyTableColumnsJSON |
|||
this.otherData = itemData |
|||
parent.tableLoading = false |
|||
}).catch(err => { |
|||
console.log(err) |
|||
parent.tableLoading = false |
|||
}) |
|||
} |
|||
// 基础数据管理-库位信息-详情-库位零件关系 |
|||
else if (item.functionName == 'relationByLocationCode') { |
|||
relationByLocationCode({locationCode: this.propsData.code}, item.url).then(res => { |
|||
let zdyTableColumnsJSON = JSON.parse(JSON.stringify(this.$isTableColumns[item.tableColumns])); |
|||
delete zdyTableColumnsJSON[0].type |
|||
this.zdyTableColumns = zdyTableColumnsJSON |
|||
this.otherData = res |
|||
parent.tableLoading = false |
|||
}).catch(err => { |
|||
console.log(err) |
|||
parent.tableLoading = false |
|||
}) |
|||
} |
|||
// 采购收货记录-合格品收货明细, 不合格品收货明细, 收货缺料明细 |
|||
else if(item.functionName == "purRecNoteCustomInfo"){ |
|||
parent.Loading.DrawerLoading = true |
|||
purRecNoteCustomInfo( item.url,this.propsData.id).then(res => { |
|||
let zdyTableColumnsJSON = JSON.parse(JSON.stringify(this.$isTableColumns[item.tableColumns])); |
|||
delete zdyTableColumnsJSON[0].type |
|||
this.zdyTableColumns = zdyTableColumnsJSON |
|||
this.otherData = res |
|||
parent.Loading.DrawerLoading = false |
|||
}).catch(err => { |
|||
console.log(err) |
|||
parent.Loading.DrawerLoading = false |
|||
}) |
|||
} |
|||
// 客户退拆记录-详情页TAB-回冲记录 |
|||
else if(item.functionName == "customerDismantleBackFlushNote"){ |
|||
let zdyTableColumnsJSON = JSON.parse(JSON.stringify(this.$isTableColumns[item.tableColumns])); |
|||
delete zdyTableColumnsJSON[0].type |
|||
this.zdyTableColumns = zdyTableColumnsJSON |
|||
this.otherData = this.propsData.noteAndBackFlushDetails |
|||
} |
|||
} |
|||
} |
|||
}) |
|||
}, |
|||
// 递归 物品子级层级 |
|||
recursion(val){ |
|||
val.forEach(item => { |
|||
if(item.componentDTOs) { |
|||
item.children = item.componentDTOs |
|||
this.recursion(item.componentDTOs) |
|||
} |
|||
}) |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
<style lang="scss" scoped> |
|||
// el-drawer |
|||
@import "./style/index.scss"; |
|||
</style> |
@ -1,137 +0,0 @@ |
|||
.el-drawer__wrapper { |
|||
z-index: 10 !important; |
|||
position: absolute; |
|||
left: 32%; |
|||
overflow: visible; |
|||
// height:calc(100% - 28px); |
|||
// top: 14px; |
|||
// right:14px |
|||
|
|||
::v-deep .el-drawer { |
|||
height: 100%; |
|||
overflow: visible; |
|||
box-shadow: 0 8px 10px -5px rgb(0 0 0 / 15%), 0 16px 24px 2px rgb(0 0 0 / 9%), 0 6px 30px 5px rgb(0 0 0 / 7%); |
|||
|
|||
.el-drawer__body { |
|||
width: 100%; |
|||
height: 100%; |
|||
display: flex; |
|||
flex-direction: column; |
|||
|
|||
.drawer-heder { |
|||
display: flex; |
|||
padding: 15px 10px; |
|||
justify-content: space-between; |
|||
align-items: center; |
|||
|
|||
.heder-left { |
|||
display: flex; |
|||
justify-content: space-between; |
|||
|
|||
.heder-img { |
|||
width: 40px; |
|||
height: 40px; |
|||
margin-right: 10px; |
|||
} |
|||
|
|||
.header-text { |
|||
padding:0 20px; |
|||
display: flex; |
|||
flex-direction: column; |
|||
justify-content: space-between; |
|||
|
|||
span:nth-child(1) { |
|||
color: #333; |
|||
font-size: 22px; |
|||
} |
|||
|
|||
span:nth-child(2) { |
|||
color: #999; |
|||
font-size: 16px; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
|
|||
.Descriptions { |
|||
padding: 0 10px; |
|||
} |
|||
|
|||
.drawer-main { |
|||
// padding-top: 20px; |
|||
flex: 1; |
|||
overflow: hidden; |
|||
// background-color: #efefef; |
|||
padding: 10px 20px 20px 30px; |
|||
border-top: solid 5px #f6f6f6; |
|||
|
|||
.el-tabs { |
|||
height: 100%; |
|||
display: flex; |
|||
flex-direction: column; |
|||
.el-tabs__header{ |
|||
// padding-bottom: 5px ; |
|||
.el-tabs__nav{ |
|||
z-index: auto !important; |
|||
} |
|||
} |
|||
|
|||
.el-tabs__content { |
|||
flex: 1; |
|||
|
|||
.el-tab-pane { |
|||
width: 100%; |
|||
height: 100%; |
|||
overflow-y: auto; |
|||
} |
|||
|
|||
.el-descriptions-item__label { |
|||
padding-right: 40px; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
|
|||
.drawer-Shut { |
|||
width: 35px; |
|||
height: 100px; |
|||
position: absolute; |
|||
top: 200px; |
|||
left: -35px; |
|||
|
|||
.el-button { |
|||
width: 100%; |
|||
height: 100%; |
|||
display: flex; |
|||
justify-content: center; |
|||
align-items: center; |
|||
|
|||
::v-deep span { |
|||
font-size: 12px; |
|||
letter-spacing: 10px; |
|||
writing-mode: tb-rl; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
} |
|||
} |
|||
|
|||
::v-deep .el-tabs__nav-wrap::after{ |
|||
content: unset !important; |
|||
} |
|||
|
|||
.currenTabel-drawer-mx-header{ |
|||
text-align: right; |
|||
padding: 0 10px 10px 0; |
|||
} |
|||
|
|||
.detailFiltersPopPage{ |
|||
position: absolute; |
|||
right: 0; |
|||
left: 0; |
|||
height: 240px; |
|||
.fullPageCover{ |
|||
height: calc(100vh - 300px) !important; |
|||
} |
|||
} |
@ -1,206 +0,0 @@ |
|||
<template> |
|||
<el-dialog |
|||
:title="formTitle" |
|||
v-loading="loading" |
|||
v-if="displayDialog" |
|||
:visible="true" |
|||
:fullscreen="true" |
|||
:modal="false" |
|||
:modal-append-to-body="false" |
|||
:show-close="false" |
|||
style="z-index:11111" |
|||
> |
|||
<curren-Form |
|||
class="handleForm" |
|||
size="medium" |
|||
:searchData="CreateFormData" |
|||
:searchForm="CreateForm" |
|||
:searchHandle="editHandle" |
|||
:searchOptions="Options" |
|||
:rules="Rules" |
|||
@submitForm="editFormClick(arguments)" |
|||
> |
|||
<template> |
|||
<el-form-item |
|||
class="formTable-box" |
|||
prop="details" |
|||
v-if="CreateFormData.details" |
|||
> |
|||
<currenTable |
|||
:tableData="CreateFormData.details" |
|||
:searchOptions="Options" |
|||
:tableColumns="detailsTableColumns" |
|||
:selectionTable="selectionTable" |
|||
:isShowIndex="isShowIndex" |
|||
@handleSelectionChange="handleSelectionChange" |
|||
@buttonClick="buttonClick" |
|||
> |
|||
<template> |
|||
<slot></slot> |
|||
</template> |
|||
</currenTable> |
|||
</el-form-item> |
|||
</template> |
|||
</curren-Form> |
|||
</el-dialog> |
|||
</template> |
|||
<script> |
|||
export default { |
|||
props: { |
|||
//名称 |
|||
formTitle: { |
|||
type: String, |
|||
default: '' |
|||
}, |
|||
//是否弹窗 |
|||
displayDialog: { |
|||
type: Boolean, |
|||
default: () => { |
|||
return false |
|||
} |
|||
}, |
|||
//主表提交数据 |
|||
CreateFormData: { |
|||
type: Object, |
|||
default: () => { |
|||
return {} |
|||
} |
|||
}, |
|||
//主表显示form |
|||
CreateForm: { |
|||
type: Array, |
|||
default: () => { |
|||
return [] |
|||
} |
|||
}, |
|||
//检验 |
|||
Rules: { |
|||
type: Object, |
|||
default: () => { |
|||
return {} |
|||
} |
|||
}, |
|||
//下拉选择 |
|||
Options: { |
|||
type: Object, |
|||
default: () => { |
|||
return {} |
|||
} |
|||
}, |
|||
//子表table显示 |
|||
detailsTableColumns: { |
|||
type: Array, |
|||
default: () => { |
|||
return [] |
|||
} |
|||
}, |
|||
selectionTable:{ |
|||
type: Boolean, |
|||
default: () => { |
|||
return false |
|||
} |
|||
}, |
|||
// 列表序号显示 |
|||
isShowIndex: { |
|||
type: Boolean, |
|||
default: false, |
|||
}, |
|||
editHandle: { |
|||
type: Array, |
|||
default: () => { |
|||
return [ |
|||
{ label: "取消", name: "cancel" }, |
|||
{ label: "确定", type: "primary", name: "determine" }, |
|||
]; |
|||
}, |
|||
}, |
|||
// loading: { |
|||
// type: Boolean, |
|||
// default: false |
|||
// }, |
|||
}, |
|||
data () { |
|||
return { |
|||
loading: false, |
|||
// editHandle: [ |
|||
// { label: "取消", name: "cancel" }, |
|||
// { label: "确定", type: "primary", name: "determine" }, |
|||
// ], |
|||
} |
|||
}, |
|||
methods: { |
|||
//点击表单提交 |
|||
editFormClick (val) { |
|||
if (val[0] == 0) { |
|||
// 取消 |
|||
this.$emit('update:displayDialog', false) |
|||
if(val[2].handleEvent)val[2].handleEvent() |
|||
} else if(val[0] == 1){ |
|||
// 确定 |
|||
val[1].validate((valid) => { |
|||
if (valid) { |
|||
const parent = this.$parent |
|||
this.loading = true |
|||
parent.handleFormSubmit().then(res => { |
|||
this.loading = false |
|||
}, err => { |
|||
this.loading = false |
|||
}) |
|||
} else { |
|||
this.$errorMsg('请检查表单') |
|||
return false; |
|||
} |
|||
}); |
|||
} else { |
|||
// 自定义 |
|||
if(val[2].handleEvent)val[2].handleEvent() |
|||
} |
|||
}, |
|||
handleSelectionChange(val){ |
|||
this.$emit("handleSelectionChange", val); |
|||
}, |
|||
//点击按钮打开自定义弹窗 |
|||
buttonClick(row,index) { |
|||
this.$emit("buttonClick", row,index); |
|||
}, |
|||
} |
|||
} |
|||
</script> |
|||
<style lang="scss" scoped> |
|||
.handleForm { |
|||
display: flex; |
|||
flex-direction: column; |
|||
width: 100%; |
|||
height: 100%; |
|||
::v-deep .el-form { |
|||
flex: 1; |
|||
display: flex; |
|||
flex-direction: column; |
|||
overflow: hidden; |
|||
.el-row { |
|||
flex: 2; |
|||
flex-wrap: wrap; |
|||
overflow: hidden; |
|||
overflow-y: auto; |
|||
} |
|||
|
|||
.formTable-box { |
|||
flex: 2; |
|||
overflow: hidden; |
|||
|
|||
.el-form-item__content { |
|||
width: 100%; |
|||
height: 100%; |
|||
display: flex; |
|||
flex-direction: column; |
|||
overflow: hidden; |
|||
margin: 0 !important; |
|||
} |
|||
} |
|||
} |
|||
|
|||
.el-table { |
|||
height: 500px !important; |
|||
} |
|||
} |
|||
</style> |
@ -1,53 +0,0 @@ |
|||
/** |
|||
* |
|||
* @returns {Array} '导入表格模板字段' |
|||
*/ |
|||
// 供货商导入表格
|
|||
export const supplierAsnExcel = { |
|||
// poNumber:"订单号",
|
|||
// number:"发货单号",
|
|||
supplierCode:"供应商代码", |
|||
planUserCode:"筹措员代码", |
|||
planArriveDate:"要求到货时间", |
|||
shipDate:"发货日期", |
|||
details:{ |
|||
projectCode:"明细-项目编号", |
|||
itemCode:"明细-物品代码", |
|||
ctype:"明细-类型", |
|||
recommendErpCode:"明细-指定ERP储位", |
|||
qty:"明细-发货数量", |
|||
uom:"明细-物品单位", |
|||
lot:"明细-生产批次", |
|||
produceDate:"明细-生产时间", |
|||
expireDate:"明细-过期时间", |
|||
packingCode:"明细-箱标签", |
|||
}, |
|||
remark:"订单备注", |
|||
} |
|||
|
|||
// 报表地址
|
|||
// const reportsUrl = "http://10.164.1.39:59088/#/reports/";
|
|||
const reportsUrl = localStorage.getItem('reportsUrl') |
|||
// 报表文件地址
|
|||
export const reportsAddress = { |
|||
PurchaseReceiptSummary:reportsUrl + '202211300914188516.rdlx',//采购收货汇总表
|
|||
Inventory_Detail:reportsUrl + '202211291142233052.rdlx',//库存账龄明细
|
|||
InventoryAccountingPeriodDetails:reportsUrl + '202211300913580741.rdlx',//库存单据明细报表
|
|||
FinishedProductDeliverySummary:reportsUrl + '202211300920074461.rdlx',//成品发货汇总表
|
|||
CompletionReceiptSummary:reportsUrl + '202211300919413598.rdlx',//完工收货汇总表
|
|||
UnPlannedReceiptSummary:reportsUrl + '202211300921294414.rdlx',//非生产退料汇总(原计划外入库汇总)
|
|||
UnplannedDeliverSummary:reportsUrl + '202211300921505958.rdlx',//非生产领料汇总(原计划外出库汇总)
|
|||
Scrap_Detail:reportsUrl + '202211300912414755.rdlx',//报废明细表
|
|||
PurchaseSum:reportsUrl + '202211300913268367.rdlx',//订单汇总查询
|
|||
PurchaseReturnSummary:reportsUrl + '202211300925599696.rdlx',//采购退货汇总
|
|||
ProductionReturnSummary:reportsUrl + '202211300918259711.rdlx',//生产退料汇总表
|
|||
ProductionIssueSummary_dy:reportsUrl + '202211300917169689.rdlx',//生产发料汇总表
|
|||
InventoryBlanace:reportsUrl + '202211300922434081.rdlx',//库存余额报表
|
|||
InventorySummary:reportsUrl + '202211300921065163.rdlx',//盘点记录汇总表
|
|||
InventoryAgingSegmentSummary:reportsUrl + '202211300912101560.rdlx',//库存账龄分段汇总表
|
|||
InventoryBookDetail:reportsUrl + '202212162111466911.rdlx',//库存流水帐明细
|
|||
InventoryBookSummary:reportsUrl + '202212162112124488.rdlx',//库存流水帐汇总
|
|||
inventoryBalanceReportLocationCode:reportsUrl + '202211300922434082.rdlx',//库存余额报表按库位
|
|||
inventoryBalanceReportLocationErpCode:reportsUrl + '202211300922434083.rdlx',//库存余额报表按ERP库位
|
|||
InventoryBookSummaryLocation:reportsUrl + '202212162112124489.rdlx',//库存流水帐汇总(库位)
|
|||
} |
@ -1,267 +0,0 @@ |
|||
/** |
|||
* |
|||
* @returns {Array} '权限' |
|||
*/ |
|||
|
|||
export function Roles(val){ |
|||
const role={ |
|||
// 通用
|
|||
"Create": "创建", |
|||
// "Edit": "修改",
|
|||
"Update": "修改", |
|||
"Delete": "删除", |
|||
|
|||
// 身份标识管理(AbpIdentity)
|
|||
"AbpIdentity": "身份标识管理", |
|||
|
|||
// 特性管理(FeatureManagement)
|
|||
"FeatureManagement": "特性管理", |
|||
|
|||
// 设置管理(SettingManagement)
|
|||
"SettingManagement": "设置管理", |
|||
|
|||
// 租户管理(AbpTenantManagement)
|
|||
"AbpTenantManagement": "租户管理", |
|||
|
|||
// 认证(Auth)
|
|||
"Auth": "认证", |
|||
//Auth-子集
|
|||
"Department": "部门", |
|||
/**/ |
|||
|
|||
// 基础数据(Basedata)
|
|||
"Basedata": "基础数据", |
|||
//Basedata-子集
|
|||
"Currency": "货币", |
|||
"CurrencyExchange": "货币兑换", |
|||
"CustomerBom": "用户清单", |
|||
"InventoryRoute": "库存路径", |
|||
"TransactionType": "交易类型", |
|||
"ProductionLineItem": "产品类项目", |
|||
"Machine": "生产线", |
|||
"Param": "参数", |
|||
"PurchasePriceSheet": "采购价格表", |
|||
"Rule": "规则", |
|||
"Strategy": "战略", |
|||
"StrategyRule": "战略规则", |
|||
"Route": "路线", |
|||
"SalePriceSheet": "销售价格表", |
|||
"StdCostPriceSheet": "标准价格表", |
|||
"WorkShop": "车间", |
|||
"WorkGroup": "工作组", |
|||
"ItemGuideBook": "指导书", |
|||
/**/ |
|||
|
|||
// 库存(Inventory)
|
|||
"Inventory": "库存", |
|||
//Inventory-子集
|
|||
"Container": "库存容量", |
|||
"LocationCapacity": "库存可用容量", |
|||
/**/ |
|||
|
|||
// 任务(Job)
|
|||
"Job": "任务", |
|||
//Job-子集
|
|||
"CheckJob": "校验任务", |
|||
"UnplannedIssueJob":"计划外出库任务", |
|||
"UnplannedReceiptJob":"计划外入库任务", |
|||
"ProductionReturnJob":"生产退库任务", |
|||
/**/ |
|||
|
|||
// 仓库(Store)
|
|||
"Store": "仓库", |
|||
//Store-子集
|
|||
"WorkOrder": "工作订单", |
|||
"ProductionReturnNote":"生产退库记录", |
|||
"InventoryTransferNote": "调拨发货", |
|||
"Print":"打印", |
|||
"Shipments": "发货任务(天津)", |
|||
"Instruments": "器具查询(天津)", |
|||
"ReceivingRecords": "收货记录(天津)", |
|||
"DeliveryRecord": "发货记录(天津)", |
|||
"CountAdjust": "库存调整", |
|||
"UnplannedIssueRequest":"非生产退料申请", |
|||
"UnplannedReceiptRequest":"非生产领料申请", |
|||
"ProductionReturnRequest":"生产退库申请", |
|||
"PurchaseReturnRequest": "采购退货申请", |
|||
"ProductRecycleRequest": "成品回收申请", |
|||
"NoOkConvertOkNote":"不合格转合格", |
|||
"PutawayRequest": "上架申请", |
|||
/**/ |
|||
|
|||
// 标签(Label)
|
|||
"labelsList":"标签查询", |
|||
"Label": "标签", |
|||
//Label-子集
|
|||
"PalletLabel":"托盘标签", |
|||
"ProductionLabel":"生产标签", |
|||
"PurchaseLabel":"采购标签", |
|||
"SaleLabel":"销售标签", |
|||
"PalletCode":"托盘编码", |
|||
"SerialCode":"序列代码", |
|||
"CountLabel":"盘点标签", |
|||
/**/ |
|||
|
|||
// 消息通知(Message)
|
|||
"Message": "消息通知", |
|||
//Message-子集
|
|||
"Announcement":"公告", |
|||
"NotifyMessage":"通知", |
|||
"PrivateMessage":"私人消息", |
|||
"MessageType":"消息类型", |
|||
"MessageTypeSubscribe":"消息订阅类型", |
|||
"UserNotifyMessage":"用户通知消息", |
|||
/**/ |
|||
|
|||
// 文件存储(FileStorage)
|
|||
"FileStorage":"文件存储", |
|||
//FileStorage-子集
|
|||
"DataImportTask":"数据导入任务", |
|||
"DataExportTask":"数据导出任务", |
|||
/**/ |
|||
|
|||
// 以下数据为接口已翻译20221103
|
|||
/**/ |
|||
//Basedata基础数据-子集
|
|||
// "Warehouse": "仓库",
|
|||
// "Area": "区域",
|
|||
// "AreaItem": "区域零件",
|
|||
// "Bom": "物品清单",
|
|||
// "InterfaceCalendar": "日历接口",
|
|||
// "Calendar": "日历",
|
|||
// "Company": "公司",
|
|||
// "Customer": "客户",
|
|||
// "CustomerItem": "客户物品",
|
|||
// "WorkStation": "工作中心",
|
|||
// "Team": "班组",
|
|||
// "Supplier": "供应商",
|
|||
// "SupplierItem": "供应商物品",
|
|||
// "Project": "项目",
|
|||
// "Shift": "班次",
|
|||
// "Uom": "计量单位",
|
|||
// "ItemBasic": "物品基础信息",
|
|||
// "ItemCategory": "物品分类信息",
|
|||
// "ItemPack": "物品包装信息",
|
|||
// "Category": "分类",
|
|||
// "Dock": "收货口",
|
|||
// "LocationGroup": "库位组",
|
|||
// "Location": "库位",
|
|||
// "ProductionLine": "生产线",
|
|||
// "Configuration": "配置",
|
|||
// "ItemQuality": "物品质量信息",
|
|||
// "AQL": "物品质检标准",
|
|||
// "SupplierTimeWindow": "供应商时间窗口",
|
|||
// "ItemStoreRelation": "库位零件关系维护",
|
|||
// "CustomerAddress": "客户地址",
|
|||
/**/ |
|||
//Inventory库存-子集
|
|||
// "Balance": "库存余额",
|
|||
// "Snapshot": "库存快照",
|
|||
// "Transaction": "库存事务",
|
|||
// "TransferLog": "库存转移日志",
|
|||
/**/ |
|||
//Job任务-子集
|
|||
// "PurchaseReceiptJob": "采购收货任务",
|
|||
// "InspectJob": "检验任务",
|
|||
// "PutawayJob": "上架任务",
|
|||
// "IssueJob": "发料任务",
|
|||
// "DeliverJob": "发货任务",
|
|||
// "PurchaseReturnJob": "采购退货任务",
|
|||
// "ProductReceiveJob": "完工收货任务",
|
|||
// "CountJob": "盘点任务",
|
|||
/**/ |
|||
//Store仓库-子集
|
|||
// "PurchaseOrder": "采购订单",
|
|||
// "SaleOrder": "销售订单",
|
|||
// "SupplierAsn": "供应商ASN",
|
|||
// "CustomerAsn": "客户发货通知",
|
|||
// "ProductionPlan": "生产计划",
|
|||
// "PreparationPlan": "备料计划",
|
|||
// "ProductReceiptNote": "完工收货记录",
|
|||
// "OfflineSettlementNote": "下线结算记录",
|
|||
// "PurchaseReceiptRequest": "到货请求",
|
|||
// "PurchaseReceiptNote": "采购收货记录",
|
|||
// "ReceiptAbnormalNote": "收货异常记录",
|
|||
// "PurchaseReturnNote": "采购退货记录",
|
|||
// "PutawayNote": "上架记录",
|
|||
// "MaterialRequest": "要料申请",
|
|||
// "IssueNote": "发料记录",
|
|||
// "UnplannedReceiptNote": "计划外入库记录",
|
|||
// "UnplannedIssueNote": "计划外出库记录",
|
|||
// "IsolationNote": "隔离记录",
|
|||
// "ScrapNote": "报废记录",
|
|||
// "DeliverPlan": "发货计划",
|
|||
// "DeliverRequest": "发货申请",
|
|||
// "DeliverNote": "发货记录",
|
|||
// "CountPlan": "盘点计划",
|
|||
// "CountNote": "盘点记录",
|
|||
// "CountAdjustNote": "盘点差异调整记录",
|
|||
// "InspectRequest": "报检单",
|
|||
// "InspectNote": "检验记录",
|
|||
// "InspectAbnormalNote": "质量异常记录",
|
|||
// "ProductRecycleNote": "成品回收记录",
|
|||
// "CustomerReturnNote": "客户退库记录",
|
|||
/**/ |
|||
|
|||
// 以下数据接口数据不存在20221103
|
|||
/**/ |
|||
// "InventoryLocationCapacity": "库位可用容量",
|
|||
// "Workshop": "车间",
|
|||
// "FISDeliverRequest":"FIS发货申请",
|
|||
// "FISDeliverNote":"FIS发货记录",
|
|||
// "Occupied": "已占用库存",
|
|||
// "Predictable": "预填充库存",
|
|||
// "TracebackNote": "追溯记录",
|
|||
// "StockReturnNote": "退库记录",
|
|||
// "UserManage": "用户",
|
|||
// "RoleManage": "权限控制",
|
|||
// "Identity": "身份",
|
|||
// "management": "管理",
|
|||
// "Role management": "角色",
|
|||
// // "Change": "修改",
|
|||
// "Change permissions": "修改权限",
|
|||
// "User management": "用户",
|
|||
// "Manage Host features": "管理主机功能",
|
|||
// "Tenant management": "租户",
|
|||
// "Manage features": "管理功能",
|
|||
// "Manage connection strings": "管理连接",
|
|||
// "Permission": "权限",
|
|||
// "PdaUserManage": "PDA控制",
|
|||
// "Param": "参数",
|
|||
// "Rule ": "规则",
|
|||
// "DocumentSetting": "文档设置",
|
|||
// "ItemSafetyStock": "物品安全库存",
|
|||
// // "UserDepartment": "用户部门对应关系",
|
|||
// "accountPeriodNote": "账期信息",
|
|||
// "UserNotifyMessage":"用户消息类型关系",
|
|||
// //调拨-线边仓
|
|||
// "lineSideWarehouseAllocationRequest":"线边仓调拨申请",
|
|||
// "lineSideWarehouseAllocationConfirm":"线边仓调拨确认",
|
|||
// "lineSideWarehouseAllocationNote":"线边仓调拨记录",
|
|||
// //调拨-储位间
|
|||
// "interStorageAllocationApply":"储位间调拨申请",
|
|||
// "interStorageAllocationConfirm":"储位间调拨确认",
|
|||
// "interStorageAllocationNote":"储位间调拨记录",
|
|||
// //调拨-客户储位
|
|||
// "customerStorageAllocationRequest":"客户储位调拨申请",
|
|||
// "customerStorageAllocationConfirm":"客户储位调拨确认",
|
|||
// "customerStorageAllocationNote":"客户储位调拨记录",
|
|||
// //东阳-追溯记录
|
|||
// "backFlushNote":"追溯记录",
|
|||
// //东阳-退拆
|
|||
// "customerDismantle":"退拆申请",
|
|||
// "customerDismantleNote":"退拆记录",
|
|||
// //回收料
|
|||
// "materialsAdjustment":"回收料调整记录",
|
|||
// "recycledMaterialsAdjustmentApply":"回收料调整申请",
|
|||
// "recycledMaterialsReceipt":"回收料收货记录",
|
|||
// // 自定义
|
|||
// "beforeGroundingReturnNote": "上架前退货记录",
|
|||
// // 非生产领料
|
|||
// "pickingRequest":"非生产领料申请",
|
|||
// // 非生产退料
|
|||
// "materialReturnRequest":"非生产退料申请"
|
|||
} |
|||
return role[val] |
|||
} |
|||
|
@ -1,7 +1,5 @@ |
|||
import * as status from "./status" |
|||
import * as options from "./options" |
|||
const filters = { |
|||
...status, |
|||
...options |
|||
...status |
|||
} |
|||
export default filters |
|||
|
@ -1,25 +0,0 @@ |
|||
import Layout from '@/layout' |
|||
import { initFromApiColumnsLable } from '@/utils/index' |
|||
const interfaceBoardRouter = { |
|||
path: '/basicConfig', |
|||
alwaysShow:true, |
|||
component: Layout, |
|||
redirect: 'noRedirect', |
|||
meta: { |
|||
title: '基础数据管理', |
|||
icon: '基础数据管理', |
|||
roles:'skip' |
|||
}, |
|||
children: [{ |
|||
path: 'ExportCustomUserSetting', |
|||
name: 'ExportCustomUserSetting', |
|||
component: () => import('@/views/basicConfig/ExportCustomUserSetting'), |
|||
meta: { |
|||
title: initFromApiColumnsLable('ExportCustomUserSetting'),//导出配置
|
|||
icon: '用户', |
|||
roles: 'skip' |
|||
} |
|||
}, |
|||
] |
|||
} |
|||
export default interfaceBoardRouter |
@ -1,25 +0,0 @@ |
|||
import Layout from '@/layout' |
|||
import { initFromApiColumnsLable } from '@/utils/index' |
|||
const interfaceBoardRouter = { |
|||
path: '/interfaceBoard', |
|||
alwaysShow:true, |
|||
component: Layout, |
|||
redirect: 'noRedirect', |
|||
meta: { |
|||
title: '接口看板管理', |
|||
icon: '报表查看', |
|||
roles:'skip' |
|||
}, |
|||
children: [{ |
|||
path: 'TestSchool', |
|||
name: 'TestSchool', |
|||
component: () => import('@/views/interfaceBoard/TestSchool'), |
|||
meta: { |
|||
title: initFromApiColumnsLable('TestSchool'), |
|||
icon: '用户', |
|||
roles: 'skip' |
|||
} |
|||
}, |
|||
] |
|||
} |
|||
export default interfaceBoardRouter |
@ -1,44 +0,0 @@ |
|||
import Layout from '@/layout' |
|||
const systemManageRouter = { |
|||
path: '/systemManage', |
|||
component: Layout, |
|||
redirect: 'noRedirect', |
|||
meta: { |
|||
title: '系统权限管理', |
|||
icon: '系统权限控制', |
|||
roles:'skip' |
|||
}, |
|||
children: [{ |
|||
path: 'UserManage', |
|||
name: 'userManage', |
|||
component: () => import('@/views/systemManage/userManage'), |
|||
meta: { |
|||
title: '用户信息维护', |
|||
icon: '用户', |
|||
roles: 'AbpIdentity.Users' |
|||
} |
|||
}, |
|||
{ |
|||
path: 'RoleManage', |
|||
name: 'roleManage', |
|||
component: () => import('@/views/systemManage/roleManage'), |
|||
meta: { |
|||
title: '权限信息维护', |
|||
icon: '权限控制', |
|||
roles: 'AbpIdentity.Roles' |
|||
} |
|||
}, |
|||
// {
|
|||
// path: 'pcMenu',
|
|||
// name: 'pcMenu',
|
|||
// // hidden: true,
|
|||
// component: () => import('@/views/systemManage/pcMenu'),
|
|||
// meta: {
|
|||
// title: 'PC权限菜单',
|
|||
// icon: 'PDA权限菜单',
|
|||
// roles: 'Auth.Menu'
|
|||
// }
|
|||
// },
|
|||
] |
|||
} |
|||
export default systemManageRouter |
Loading…
Reference in new issue