|
@@ -1,7 +1,17 @@
|
|
|
<template>
|
|
|
- <template-page v-if="pageShow" ref="pageRef" :get-list="getList" :table-attributes="tableAttributes"
|
|
|
- :table-events="tableEvents" :options-evens-group="optionsEvensGroup" :moreParameters="moreParameters"
|
|
|
- :column-parsing="columnParsing" :exportList="exportList" :operation="operation()" key="pageType">
|
|
|
+ <template-page
|
|
|
+ v-if="pageShow"
|
|
|
+ ref="pageRef"
|
|
|
+ :get-list="getList"
|
|
|
+ :table-attributes="tableAttributes"
|
|
|
+ :table-events="tableEvents"
|
|
|
+ :options-evens-group="optionsEvensGroup"
|
|
|
+ :moreParameters="moreParameters"
|
|
|
+ :column-parsing="columnParsing"
|
|
|
+ :exportList="exportList"
|
|
|
+ :operation="operation()"
|
|
|
+ key="pageType"
|
|
|
+ >
|
|
|
<div slot="moreSearch">
|
|
|
<el-radio-group v-model="pageType" size="mini" @input="changePageType">
|
|
|
<el-radio-button label="list">列表</el-radio-button>
|
|
@@ -11,8 +21,13 @@
|
|
|
<br /><br />
|
|
|
</div>
|
|
|
<div class="cartographer_big">
|
|
|
- <el-dialog :title="formDialogTitles[formDialogType]" width="100%" :modal="false" :visible.sync="formDialog"
|
|
|
- :before-close="handleClose">
|
|
|
+ <el-dialog
|
|
|
+ :title="formDialogTitles[formDialogType]"
|
|
|
+ width="100%"
|
|
|
+ :modal="false"
|
|
|
+ :visible.sync="formDialog"
|
|
|
+ :before-close="handleClose"
|
|
|
+ >
|
|
|
<zj-page-container>
|
|
|
<zj-page-fill>
|
|
|
<div style="box-sizing: border-box; padding: 20px 20px 0 20px">
|
|
@@ -32,7 +47,9 @@
|
|
|
<el-button v-if="formDialogType == 0" size="mini" type="primary" @click="save">保存</el-button>
|
|
|
<el-button v-if="formDialogType == 1" size="mini" type="primary" @click="submit">提交</el-button>
|
|
|
<el-button v-if="formDialogType == 3" size="mini" type="primary" @click="examine('OK')">审核通过</el-button>
|
|
|
- <el-button v-if="formDialogType == 3" size="mini" type="primary" @click="examine('FAIL')">审核驳回</el-button>
|
|
|
+ <el-button v-if="formDialogType == 3" size="mini" type="primary" @click="examine('FAIL')"
|
|
|
+ >审核驳回</el-button
|
|
|
+ >
|
|
|
</div>
|
|
|
</zj-page-container>
|
|
|
</el-dialog>
|
|
@@ -62,7 +79,7 @@ import storage_table from '../mixins/storage_table'
|
|
|
import storage_goods from '../mixins/storage_goods'
|
|
|
import storage_codes from '../mixins/storage_codes'
|
|
|
import common from '../mixins/common_code'
|
|
|
-import { delayPerform, firstPerform, intervalPerform, passivePerform, queuePerform } from "js-perform-lock";
|
|
|
+import { delayPerform, firstPerform, intervalPerform, passivePerform, queuePerform } from 'js-perform-lock'
|
|
|
export default {
|
|
|
components: { TemplatePage },
|
|
|
mixins: [import_mixin, operation_mixin, form_ty, storage_table, storage_goods, storage_codes, common],
|
|
@@ -102,8 +119,8 @@ export default {
|
|
|
updateTime: '',
|
|
|
venderId: '',
|
|
|
venderName: '',
|
|
|
- storageId: '',
|
|
|
- storageName: '',
|
|
|
+ storageId: '',
|
|
|
+ storageName: '',
|
|
|
fileUrl: [],
|
|
|
items: [],
|
|
|
codeInfoList: []
|
|
@@ -111,8 +128,8 @@ export default {
|
|
|
activeName: 'goodsInfo',
|
|
|
goods_material_id: '',
|
|
|
joinCode: false,
|
|
|
- joinCodeText: JSON.parse(localStorage.getItem('greemall_user')).joinCode,
|
|
|
- logs:[]
|
|
|
+ joinCodeText: JSON.parse(localStorage.getItem('greemall_user')).joinCode,
|
|
|
+ logs: []
|
|
|
}
|
|
|
},
|
|
|
computed: {
|
|
@@ -126,7 +143,7 @@ export default {
|
|
|
click: () => {
|
|
|
this.openForm()
|
|
|
this.formDialog = true
|
|
|
- this.joinCode = JSON.parse(localStorage.getItem('greemall_user')).joinCode === "CODE"
|
|
|
+ this.joinCode = JSON.parse(localStorage.getItem('greemall_user')).joinCode === 'CODE'
|
|
|
}
|
|
|
})
|
|
|
]
|
|
@@ -153,18 +170,22 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
- tishicuowu:(new delayPerform(500)).refactor(function( /**可接收参数**/ ){
|
|
|
- if(this.logs){
|
|
|
- var logs = Array.from(new Set(JSON.parse(JSON.stringify(this.logs)).map(item=>{
|
|
|
- return `${item.index!==undefined ? "第" + (item.index+1) +"行:" : ""}${item.errMsg}`
|
|
|
- })))
|
|
|
+ tishicuowu: new delayPerform(500).refactor(function (/**可接收参数**/) {
|
|
|
+ if (this.logs) {
|
|
|
+ var logs = Array.from(
|
|
|
+ new Set(
|
|
|
+ JSON.parse(JSON.stringify(this.logs)).map(item => {
|
|
|
+ return `${item.index !== undefined ? '第' + (item.index + 1) + '行:' : ''}${item.errMsg}`
|
|
|
+ })
|
|
|
+ )
|
|
|
+ )
|
|
|
this.logs = []
|
|
|
this.$message({
|
|
|
dangerouslyUseHTMLString: true,
|
|
|
type: 'warning',
|
|
|
- message: logs.join("<div/>"),
|
|
|
- duration: 5000,
|
|
|
- });
|
|
|
+ message: logs.join('<div/>'),
|
|
|
+ duration: 5000
|
|
|
+ })
|
|
|
}
|
|
|
}),
|
|
|
changePageType() {
|
|
@@ -209,7 +230,7 @@ export default {
|
|
|
openForm() {
|
|
|
this.isEditIndex = -1
|
|
|
this.getGysList()
|
|
|
- this.getWarehouseList()
|
|
|
+ this.getWarehouseList()
|
|
|
this.getBaseList()
|
|
|
},
|
|
|
// 打开详情弹窗
|
|
@@ -219,7 +240,7 @@ export default {
|
|
|
fileUrl: res.data.fileUrl ? [{ url: res.data.fileUrl }] : [],
|
|
|
items: res.data.items.map(item => ({ ...item, details: {} }))
|
|
|
})
|
|
|
- this.joinCode = res.data.joinCode === "CODE"
|
|
|
+ this.joinCode = res.data.joinCode === 'CODE'
|
|
|
this.formDialogType = type
|
|
|
this.openForm()
|
|
|
this.formDialog = true
|
|
@@ -294,12 +315,12 @@ export default {
|
|
|
save() {
|
|
|
this.$refs.formRef.validateField(this.getVfyKey(this.isEditIndex), (valid, invalidFields, errLabels) => {
|
|
|
if (valid && this.eidtItems()) {
|
|
|
- if(!this.formData.storageId && JSON.parse(localStorage.getItem('greemall_user')).joinCode != "NO"){
|
|
|
- return this.$message({
|
|
|
- type: 'warning',
|
|
|
- message: '仓库不能为空'
|
|
|
- })
|
|
|
- }
|
|
|
+ if (!this.formData.storageId && JSON.parse(localStorage.getItem('greemall_user')).joinCode != 'NO') {
|
|
|
+ return this.$message({
|
|
|
+ type: 'warning',
|
|
|
+ message: '仓库不能为空'
|
|
|
+ })
|
|
|
+ }
|
|
|
goodsPurchaseAdd({
|
|
|
...this.formData,
|
|
|
items: this.formData.items.map((item, index) => ({ ...item, index: index + 1 })),
|