Browse Source

【前端NEV】暂存

ag_report_nev
安虹睿 1 year ago
parent
commit
bff368e37f
  1. 5
      fe/PC/src/components/StepsForm/index.vue
  2. 34
      fe/PC/src/components/StepsForm/style/index.scss
  3. 23
      fe/PC/src/components/currenTable/index.vue
  4. 4
      fe/PC/src/components/newAndEdiDialog/index.vue
  5. 12
      fe/PC/src/router/index.js
  6. 2
      fe/PC/src/utils/tableColumns/index.js
  7. 2
      fe/PC/src/utils/tabsDesTions/index.js
  8. 260
      fe/PC/src/views/basicData/ItemsManage/Kitting.vue
  9. 61
      fe/PC/src/views/basicData/ItemsManage/Kitting_old.vue
  10. 66
      fe/PC/src/views/basicData/ItemsManage/Utensil.vue

5
fe/PC/src/components/StepsForm/index.vue

@ -73,6 +73,7 @@
:tableColumns="detailsTableColumns"
:selectionTable="false"
@push="detailsDataPush(arguments)"
@clear="detailsClear(arguments)"
>
<template v-if="showDeleteButton">
<el-table-column
@ -92,6 +93,7 @@
</el-form-item>
</template>
</curren-Form>
<!-- todo:是否需要预览这部如果不可动态就新建一个组件删除预览 -->
<curren-Form
v-if="active === 2"
size="medium"
@ -404,6 +406,9 @@ export default {
detailsDataPush (val) {
this.$emit("detailsDataPush", val)
},
detailsClear(val) {
this.$emit("detailsClear", val)
},
// //
// tuoFormPrint () {
// this.$emit('tuoFormPrint')

34
fe/PC/src/components/StepsForm/style/index.scss

@ -3,6 +3,7 @@
height: 100%;
display: flex;
flex-direction: column;
padding-bottom: 15px;
::v-deep .el-steps {
padding-bottom: 15px;
@ -25,17 +26,19 @@
}
.page2 {
flex: 1;
display: flex;
flex-direction: column;
justify-content: space-between;
padding-bottom: 54px;
overflow: hidden;
overflow-y: auto;
// flex: 1;
// display: flex;
// flex-direction: column;
// justify-content: space-between;
// // padding-bottom: 54px;
// overflow: hidden;
// overflow-y: auto;
height: calc(100% - 95px);
::v-deep .el-form {
flex: 1;
display: flex;
height: 100%;
.el-row {
display: none;
}
@ -87,9 +90,9 @@
}
::v-deep .formButton {
position: absolute;
bottom: 0;
right: 0;
// position: absolute;
// bottom: 0;
// right: 0;
z-index: 3;
}
}
@ -98,7 +101,7 @@
flex: 1;
display: flex;
flex-direction: column;
padding-bottom: 54px;
// padding-bottom: 54px;
overflow: hidden;
overflow-y: auto;
@ -113,7 +116,8 @@
}
.formTable-box {
flex: 1;
margin-bottom: 0;
// flex: 1;
.el-form-item__content {
width: 100%;
@ -125,9 +129,9 @@
}
}
::v-deep .formButton {
position: absolute;
bottom: 0;
right: 0;
// position: absolute;
// bottom: 0;
// right: 0;
z-index: 3;
}
}

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

@ -135,6 +135,15 @@
:key="index"
></el-option>
</el-select>
<el-form-item>
<filterSelect
v-if="item.type === 'filterSelect'"
:selectModel="scope.row[item.prop]"
:selectItem="item"
@filterOptionSelectHandle="(item,props,val)=>{filterOptionSelectHandle(item,props,val,scope)}"
@filterClearHandle="(item)=>{filterClearHandle(item,scope)}"
></filterSelect>
</el-form-item>
<!--查询下拉-->
<el-form-item
v-if="item.type === 'autocomplete'"
@ -309,9 +318,13 @@
import Sortable from "sortablejs";
import { formatTimeStrToStr } from "@/utils/formatTime";
import { getMatchRegConformValue } from "@/utils/index"
import filterSelect from "@/components/filterSelect"
import _ from "lodash";
export default {
name: "currenTable",
components: {
filterSelect
},
filters: {
formatDate(time) {
if (time == null) {
@ -608,6 +621,16 @@ export default {
}
this.$emit("push", item, scope, val);
},
// filterSelectoption
filterOptionSelectHandle(item,props,val,scope){
this.tableData[scope.$index][props['prop']] = val
this.$emit("push", item,props,val,scope);
},
// filterSelect
filterClearHandle(item,scope){
this.tableData[scope.$index][item['prop']] = ""
this.$emit("clear",item,scope)
},
// selectFocus (val, item) {
// this.selectLoading = true;
// let func = item.focus

4
fe/PC/src/components/newAndEdiDialog/index.vue

@ -22,6 +22,7 @@
:rules="Rules"
@changeInput="changeInput"
@push="DataPush(arguments)"
@clear="DataClear(arguments)"
@submitForm="FormClick(arguments)"
@radioChange="radioChange"
@changeSelect="changeSelect"
@ -208,6 +209,9 @@ export default {
DataPush (val) {
this.$emit('push', val)
},
DataClear(val){
this.$emit('clear', val)
},
deleteRow(index, tableData) {
this.$emit('deleteRow', index, tableData)
},

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

@ -153,7 +153,7 @@ export const constantRoutes = [
name: 'Utensil',
meta: {
keepAlive : true,
title: 'Utensil',
title: '器具',
icon: '系统首页',
}
}]
@ -169,7 +169,7 @@ export const constantRoutes = [
name: 'PositionCode',
meta: {
keepAlive : true,
title: 'PositionCode',
title: '位置码',
icon: '系统首页',
}
}]
@ -180,12 +180,12 @@ export const constantRoutes = [
redirect: '/gridlayout',
hidden: true,
children: [{
path: 'TotalQuantity',
component: () => import('@/views/basicData/ItemsManage/TotalQuantity.vue'),
name: 'TotalQuantity',
path: 'Kitting',
component: () => import('@/views/basicData/ItemsManage/Kitting.vue'),
name: 'Kitting',
meta: {
keepAlive : true,
title: 'TotalQuantity',
title: 'Kitting总成',
icon: '系统首页',
}
}]

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

@ -3935,7 +3935,7 @@ export const Utensil = [
]
// 总成量份
export const TotalQuantity = [
export const Kitting = [
{
label: _Names.itemCode,
prop: "itemCode",

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

@ -2829,7 +2829,7 @@ export const Utensil = [
]
// 总成量份
export const TotalQuantity = [
export const Kitting = [
{
label: _Names.itemCode,
prop: "itemCode",

260
fe/PC/src/views/basicData/ItemsManage/Kitting.vue

@ -0,0 +1,260 @@
<template>
<div class="page-box" v-loading="Loading.appMainLoading">
<tablePagination
:currenButtonData="currenButtonData"
:tableData="tableData"
:tableLoading="Loading.tableLoading"
:tableColumns="tableColumns"
@rowDrop="rowDrop"
:totalCount="totalCount"
:multipleSelection="multipleSelection"
:MaxResultCount="PageListParams.MaxResultCount"
@topbutton="topbutton"
@inlineDialog="inlineDialog"
@sortChange="sortChange"
@alertoldSkipCount="alertoldSkipCount"
@alterResultCount="alterResultCount"
@handleSelectionChange="handleSelectionChange"
@buttonOperationClick="buttonOperationClick"
:currentPageProps="oldSkipCount"
:quicklySearchOption="quicklySearchOption"
@quicklySearchClick="quicklySearchClick"
@quicklySearchClear="quicklySearchClear"
:primarySearchOption="primarySearchOption"
@overallSearchFormClick="overallSearchFormClick"
:httpOverallSearchData="httpOverallSearchData"
>
</tablePagination>
<!--新增-->
<stepsForm
:formTitle="formTitle"
:displayDialog="displayDialog"
:CreateFormData="CreateFormData"
:previewFormData="previewFormData"
:CreateForm="CreateForm"
:Rules="editRules.cerateRule"
:Options="editOptions"
:detailsTableColumns="AddDetailsTableColumns"
:childTableData="childTableData"
@close="stepsClose(arguments)"
@detailsDataPush="detailsDataPush"
@detailsClear="detailsClear"
></stepsForm>
<!-- @DataPush="DataPush" -->
<!-- @detailsDataPush="detailsDataPush"
@autocompleteChange="autocompleteChange"
@typeSelectOptionClick="typeSelectOptionClick" -->
<!-- 新导入 disabledMethod 导入方式禁用 disabledIsAllowPartImport 是否局部导入禁用-->
<!-- methodValue 导入方式默认选项 是否局部导入 默认选项 -->
<importFile
:loading="Loading.importLoading"
:show="displayDialog.importDialog"
:URL="URL"
:disabledMethod = {method1:false,method2:false,method3:false}
:disabledIsAllowPartImport = {isAllowPartImport1:false,isAllowPartImport2:false}
isAllowPartImportValue="1"
@importClick="postImportMergeClick(arguments)"
@postImportDown="importDown"
></importFile>
<!-- 搜索按钮窗体组件 -->
<searchPage
ref="searchTable"
:tableLoading="Loading.autoTableLoading"
:advancedFilter="advancedFilter()"
:filterPageListParams="filterPageListParams"
:formTitle="searchTitle"
:displayDialog="displayDialog.AddNewDialog"
:searchTableData="searchData"
:searchTableColumns="searchColumns"
:searchTotalCount="searchTotalCount"
:supplierItemPage="searchPageListParams"
@handleSelectionChange="prepareFormData"
@SizeChange="searchAlterResultCount($event, searchPageListParams)"
@CurrentChange="searchAlertoldSkipCount($event, searchPageListParams)"
@tableButtonClick="searchSubmit(arguments)"
></searchPage>
<!--抽屉-->
<curren-Drawer
:title="tableColumns"
:tableColumns="tableColumns"
:DrawerLoading="Loading.DrawerLoading"
:drawer="displayDialog.detailsDialog"
:dropdownData="dropdownData"
:propsData="propsData"
:tabsDesTions="tabsDesTions"
@drawerShut="(val) => (displayDialog.detailsDialog = val)"
@drawerbutton="drawerbuttonHandle"
@handleCommand="drawerHandle"
@close-value="closeValue"
></curren-Drawer>
</div>
</template>
<script>
import { tableMixins } from "@/mixins/TableMixins"
import { LoadingMixins } from "@/mixins/LoadingMixins"
import { drawerMixins } from "@/mixins/drawerMixins"
import { TableHeaderMixins } from "@/mixins/TableHeaderMixins"
import { newAndEdiDialogMixins } from "@/mixins/newAndEdiDialogMixins"
import { mixins } from "@/mixins/mixins"
import { filterSelectMixins } from '@/mixins/filter-Select'
export default {
name: "Kitting",
mixins: [
tableMixins,
LoadingMixins,
drawerMixins,
TableHeaderMixins,
mixins,
filterSelectMixins,
newAndEdiDialogMixins
],
computed: {
editDialog: {
get: function () {
return this.displayDialog.newDialog || this.displayDialog.editDialog;
},
},
},
data () {
return {
URL: 'basedata/item-quality',
//
currenButtonData: [
this.defaultAddBtn(),//
this.defaultImportBtn(),//
this.defaultExportBtn(),//
this.defaultFieldSettingBtn(),//
this.defaultFreshBtn(),//
this.defaultFilterBtn(),//
],
//
CreateFormData: {
code:null,
remark:null,
details:[]
},
editOptions: {},
CreateForm: [
{ type: "input", label: "编码", prop: "code",colSpan: 12 },
{ type: "input", label: "备注", prop: "remark", colSpan: 12 },
],
editRules: {
cerateRule: {
code: [{ required: true, trigger: "blur", message: "不可为空" }],
},
},
AddDetailsTableColumns: [
{ type:"input", label: "包装数量", prop: 'stdPack',width:"auto" },
{ type: "filterSelect", label: "物品代码", prop: "itemCode", optionsLabel: "name", optionsValue: "code",
focus: (type,val) => { return this.getFilterList(type, val, "basedata/Item-Basic")},
searchButton: (val) => { this.showSerarchPage(val, 'basedata/Item-Basic', 'ItemBasic', '物品选择', this.CreateFormData) },
width: "auto",searchButton:false
},
{ label: "物料名称", prop: "itemName",width:"auto" },
{ label: "物料描述1", prop: "itemDesc1",width:"auto" },
{ label: "物料描述2", prop: "itemDesc2",width:"auto" },
{ label: "配置", prop: 'configuration',width:"auto" },
],
childTableData:[{
stdPack:null,
itemCode:null,
itemName:null,
itemDesc1:null,
itemDesc2:null,
configuration:null,
}],
};
},
mounted () {
this.paging();
},
methods: {
addNewDataPush(val){
console.log(201,val)
},
drawerbuttonHandle(val){
if(val == "edit"){
this.formTitle = this.$route.meta.title + "编辑";
this.displayDialog.newDialog = true
this.CreateFormData = this.propsData
this.childTableData = [{
stdPack:null,
itemCode:null,
itemName:null,
itemDesc1:null,
itemDesc2:null,
configuration:null,
}]
// this.formReveal = false
// this.theEvent = "edit"
}else{
this.drawerbutton(val)
}
},
FormSubmitHandle(val){
this.$nextTick(()=>{
this.FormSubmit(val)
})
},
PalletlFunction (val) {
return new Promise((resolve, reject) => {
let array = []
let _isEmpty = 0
this.CreateFormData.details.forEach(item => {
array.push(item.itemCode)
if(!item.itemCode || item.itemCode.length <= 0 || !item.stdPack || item.stdPack.length <= 0 || Number(item.stdPack) == 0){
_isEmpty ++
}
})
if(_isEmpty > 0){
this.$errorMsg('【包装数量】与【物料代码】不能为空!')
reject()
}
let arraySort = array.sort()
for(let i=0; i<arraySort.length; i++){
if(arraySort[i] == arraySort[i+1]){
this.$errorMsg('物料:【' + arraySort[i] + '】重复,请删除后,再操作!')
reject()
break
}
}
this.previewFormData = this.CreateFormData;
resolve();
});
},
stepsSubmit (val) {
return new Promise((resolve, reject) => {
console.log(259,this.previewFormData)
console.log(260,this.CreateFormData)
reject();
// postCreate(this.previewFormData, this.URL).then((res) => {
// this.stepsPrint = res
// this.propsData = res
// resolve();
// }).catch(err => {
// reject();
// });
});
},
detailsDataPush(data){
if(data[1].prop == "itemCode"){
this.CreateFormData.details[data[3].$index].itemName = data[0].name
this.CreateFormData.details[data[3].$index].itemDesc1 = data[0].desc1
this.CreateFormData.details[data[3].$index].itemDesc2 = data[0].desc2
this.CreateFormData.details[data[3].$index].configuration = data[0].configuration
}
},
detailsClear(data){
if(data[0].prop == "itemCode"){
this.CreateFormData.details[data[1].$index].itemName = ""
this.CreateFormData.details[data[1].$index].itemDesc1 = ""
this.CreateFormData.details[data[1].$index].itemDesc2 = ""
this.CreateFormData.details[data[1].$index].configuration = ""
}
}
}
};
</script>
<style lang="scss" scoped>
@import "../../../styles/basicData.scss";
</style>

61
fe/PC/src/views/basicData/ItemsManage/TotalQuantity.vue → fe/PC/src/views/basicData/ItemsManage/Kitting_old.vue

@ -39,6 +39,7 @@
:Handle="editHandle"
:Rules="formReveal ? editRules.cerateRule : editRules.editRule"
@push="addNewDataPush"
@clear="addNewDataClear"
@FormSubmit="FormSubmit"
@close="FormClose"
@goBack="goBack"
@ -143,33 +144,75 @@ export default {
},
editOptions: {},
CreateForm: [
// 1 2
{ type:"inputNumber", label: "包装数量", prop: 'stdPack',colSpan: 12, min:1 },
{ type: "filterSelect", label: "物品代码", prop: "itemCode", optionsLabel: "name", optionsValue: "code",
focus: (type,val) => { return this.getFilterList(type, val, "basedata/Item-Basic")},
searchButton: (val) => { this.showSerarchPage(val, 'basedata/Item-Basic', 'ItemBasic', '物品选择', this.CreateFormData) },
colSpan: 12
},
{ type: "input", label: "总成", prop: "code", colSpan: 12 },
{ type: "inputNumber", label: "数量", prop: "qty", colSpan: 12, min:1 },
{ type:"input", disabled:true, label: "物料名称", prop: "itemName",colSpan: 12 },
{ type:"input", disabled:true, label: "物料描述1", prop: "itemDesc1",colSpan: 12 },
{ type:"input", disabled:true, label: "物料描述2", prop: "itemDesc2",colSpan: 12 },
{ type:"input", disabled:true, label: "配置", prop: 'configuration',colSpan: 12 },
],
editForm: [
{ type: "input", label: "总成", prop: "code", colSpan: 12 },
{ type: "inputNumber", label: "数量", prop: "qty", colSpan: 12, min:1 },
{ type:"inputNumber", label: "包装数量", prop: 'stdPack',colSpan: 12, min:1 },
{ type: "filterSelect", label: "物品代码", prop: "itemCode", optionsLabel: "name", optionsValue: "code",
focus: (type,val) => { return this.getFilterList(type, val, "basedata/Item-Basic")},
searchButton: (val) => { this.showSerarchPage(val, 'basedata/Item-Basic', 'ItemBasic', '物品选择', this.CreateFormData) },
colSpan: 12
},
{ type:"input", disabled:true, label: "物料名称", prop: "itemName",colSpan: 12 },
{ type:"input", disabled:true, label: "物料描述1", prop: "itemDesc1",colSpan: 12 },
{ type:"input", disabled:true, label: "物料描述2", prop: "itemDesc2",colSpan: 12 },
{ type:"input", disabled:true, label: "配置", prop: 'configuration',colSpan: 12 },
],
editRules: {
cerateRule: {
code: [{ required: true, trigger: "blur", message: "不可为空" }],
qty: [{ required: true, trigger: "blur", message: "不可为空" }],
stdPack: [{ required: true, trigger: "blur", message: "不可为空" }],
itemCode: [{ required: true, trigger: "blur", message: "不可为空" }],
},
editRule: {
code: [{ required: true, trigger: "blur", message: "不可为空" }],
qty: [{ required: true, trigger: "blur", message: "不可为空" }],
stdPack: [{ required: true, trigger: "blur", message: "不可为空" }],
itemCode: [{ required: true, trigger: "blur", message: "不可为空" }],
}
},
};
},
mounted () {
this.paging();
},
methods:{
addNewDataPush(data){
if(data[1].prop == "itemCode"){
if(this.formReveal){
this.CreateFormData.itemName = data[0].name
this.CreateFormData.itemDesc1 = data[0].desc1
this.CreateFormData.itemDesc2 = data[0].desc2
this.CreateFormData.configuration = data[0].configuration
}else{
this.editFormData.itemName = data[0].name
this.editFormData.itemDesc1 = data[0].desc1
this.editFormData.itemDesc2 = data[0].desc2
this.editFormData.configuration = data[0].configuration
}
}
},
addNewDataClear(data){
if(data[0].prop == "itemCode"){
if(this.formReveal){
this.CreateFormData.itemName = ""
this.CreateFormData.itemDesc1 = ""
this.CreateFormData.itemDesc2 = ""
this.CreateFormData.configuration = ""
}else{
this.editFormData.itemName = ""
this.editFormData.itemDesc1 = ""
this.editFormData.itemDesc2 = ""
this.editFormData.configuration = ""
}
}
}
}
};
</script>

66
fe/PC/src/views/basicData/ItemsManage/Utensil.vue

@ -39,7 +39,7 @@
:Handle="editHandle"
:Rules="formReveal ? editRules.cerateRule : editRules.editRule"
@push="addNewDataPush"
@FormSubmit="FormSubmit"
@FormSubmit="FormSubmitHandle"
@close="FormClose"
@goBack="goBack"
></newAndEdiDialog>
@ -82,7 +82,7 @@
:propsData="propsData"
:tabsDesTions="tabsDesTions"
@drawerShut="(val) => (displayDialog.detailsDialog = val)"
@drawerbutton="drawerbutton"
@drawerbutton="drawerbuttonHandle"
@handleCommand="drawerHandle"
@close-value="closeValue"
></curren-Drawer>
@ -129,6 +129,8 @@ export default {
//
CreateFormData: {
code:null,
codeSuffix:null,
codeType:"Q",
stdPackQty:null,
creationTime:null,
createUser:null,
@ -136,6 +138,8 @@ export default {
//
editFormData: {
code:null,
codeSuffix:null,
codeType:"Q",
stdPackQty:null,
creationTime:null,
createUser:null,
@ -143,35 +147,69 @@ export default {
},
editOptions: {},
CreateForm: [
{ type: "input", label: "器具号", prop: "code", colSpan: 12 },
{ type: "prefixInput", label: "器具号", prop: "codeSuffix",prefixProp:"codeType",prefixWidth:'50px',prefixDisabled:true, colSpan: 12 },
{ type: "inputNumber", label: "标包数量", prop: "stdPackQty", colSpan: 12, min:1 },
{ type: "dateTime", label: "创建时间", prop: "creationTime", colSpan: 12 },
{ type: "input", label: "创建人", prop: "createUser", colSpan: 12 },
],
editForm: [
{ type: "input", label: "器具号", prop: "code", colSpan: 12 },
{ type: "prefixInput", label: "器具号", prop: "codeSuffix",prefixProp:"codeType",prefixWidth:'50px',prefixDisabled:true, colSpan: 12 },
{ type: "inputNumber", label: "标包数量", prop: "stdPackQty", colSpan: 12, min:1 },
{ type: "dateTime", label: "创建时间", prop: "creationTime", colSpan: 12 },
{ type: "input", label: "创建人", prop: "createUser", colSpan: 12 },
],
editRules: {
cerateRule: {
code: [{ required: true, trigger: "blur", message: "不可为空" }],
codeSuffix: [{ required: true, trigger: "blur", message: "不可为空" }],
stdPackQty: [{ required: true, trigger: "blur", message: "不可为空" }],
creationTime: [{ required: true, trigger: "change", message: "不可为空" }],
createUser: [{ required: true, trigger: "change", message: "不可为空" }],
},
editRule: {
code: [{ required: true, trigger: "blur", message: "不可为空" }],
codeSuffix: [{ required: true, trigger: "blur", message: "不可为空" }],
stdPackQty: [{ required: true, trigger: "blur", message: "不可为空" }],
creationTime: [{ required: true, trigger: "change", message: "不可为空" }],
createUser: [{ required: true, trigger: "change", message: "不可为空" }],
}
},
};
},
mounted () {
this.paging();
},
methods: {
addNewDataPush(val){
console.log(201,val)
},
drawerbuttonHandle(val){
if(val == "edit"){
this.formTitle = this.$route.meta.title + "编辑";
this.formReveal = false
this.theEvent = "edit"
const listAssign = (arr1, arr2) => {
Object.keys(arr1).forEach(item => {
arr1[item] = arr2[item]
})
}
listAssign(this.editFormData, this.propsData)
if(this.$route.name == 'CustomerItem'){
this.editFormData.beginTime = new Date(this.propsData.beginTime)
this.editFormData.endTime = new Date(this.propsData.endTime)
}
// this.$listAssign(this.editFormData, this.propsData)
this.displayDialog.editDialog = true
// todo:-code
this.editFormData.codeType = this.editFormData.code && this.editFormData.code.length > 0 ? this.editFormData.code.slice(0,1) : "Q"
this.editFormData.codeSuffix = this.editFormData.code && this.editFormData.code.length > 0 ? this.editFormData.code.slice(1) : null
console.log(210,this.editFormData)
}else{
this.drawerbutton(val)
}
},
FormSubmitHandle(val){
// todo:codeType + code
if(this.formReveal){
this.CreateFormData.code = this.CreateFormData.codeType + this.CreateFormData.codeSuffix
}else{
this.editFormData.code = this.editFormData.codeType + this.editFormData.codeSuffix
}
this.$nextTick(()=>{
this.FormSubmit(val)
})
},
}
};
</script>

Loading…
Cancel
Save