fix:出库入规则优化
This commit is contained in:
@@ -131,29 +131,29 @@
|
||||
<el-dialog
|
||||
:close-on-click-modal="false"
|
||||
title="表单同步测试"
|
||||
:visible.sync=syncShow
|
||||
:visible.sync="syncShow"
|
||||
width="800px"
|
||||
@close="syncAnalyseCannel"
|
||||
>
|
||||
<el-form ref="form" :model="syncForm" :rules="rules" size="mini" label-width="50px">
|
||||
<el-row :gutter="40" class="panel-group">
|
||||
<el-col :span="11">
|
||||
<el-form-item label="表单:" prop="occupystruct_qty">
|
||||
<el-input disabled v-model="syncForm.form_name" :precision="0" style="width: 150px;" />
|
||||
<el-form-item label="表单:" prop="occupystruct_qty">
|
||||
<el-input v-model="syncForm.form_name" disabled :precision="0" style="width: 150px;" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="11">
|
||||
<el-form-item label="存储:" prop="needSave">
|
||||
<el-form-item label="存储:" prop="needSave">
|
||||
<el-switch
|
||||
v-model="syncForm.needSave"
|
||||
active-color="#13ce66"
|
||||
inactive-color="#ff4949">
|
||||
</el-switch>
|
||||
inactive-color="#ff4949"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-form-item label="测试数据" prop="analyseData">
|
||||
<el-input type="textarea" v-model="syncForm.analyseData" :precision="0" style="width: 650px;" />
|
||||
<el-form-item label="测试数据" prop="analyseData">
|
||||
<el-input v-model="syncForm.analyseData" type="textarea" :precision="0" style="width: 650px;" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div v-if="viewMst.length >0">
|
||||
@@ -180,41 +180,41 @@
|
||||
<el-table-column min-width="120" show-overflow-tooltip prop="qty" label="数量" align="center" />
|
||||
<el-table-column min-width="120" show-overflow-tooltip prop="vehicle_code" label="载具" align="center" />
|
||||
<el-table-column min-width="120" show-overflow-tooltip prop="status" label="单据状态" align="center" />
|
||||
<el-table-column min-width="120" show-overflow-tooltip v-for="(item, index) in viewMstCols" :key="item.value" :label="item.lable" >
|
||||
<template slot-scope="scope">{{scope.row.form_data[item.value]}}</template>
|
||||
<el-table-column v-for="(item, index) in viewMstCols" :key="item.value" min-width="120" show-overflow-tooltip :label="item.lable">
|
||||
<template slot-scope="scope">{{ scope.row.form_data[item.value] }}</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
<div v-if="hasDtl">
|
||||
<div class="crud-opts2">
|
||||
<span class="role-span2">明细数据</span>
|
||||
</div>
|
||||
<el-card class="box-card" shadow="never" :body-style="{padding:'0'}">
|
||||
<!--表格渲染-->
|
||||
<el-table
|
||||
ref="table"
|
||||
:data="viewDtl"
|
||||
style="width: 100%;"
|
||||
max-height="300"
|
||||
size="mini"
|
||||
border
|
||||
:highlight-current-row="true"
|
||||
:header-cell-style="{background:'#f5f7fa',color:'#606266'}"
|
||||
>
|
||||
<el-table-column min-width="120" show-overflow-tooltip prop="id" label="id" align="center" />
|
||||
<el-table-column min-width="120" show-overflow-tooltip prop="code" label="单据编码" align="center" />
|
||||
<el-table-column min-width="120" show-overflow-tooltip prop="biz_code" label="业务单" align="center" />
|
||||
<el-table-column min-width="120" show-overflow-tooltip prop="material_id" label="物料id" align="center" />
|
||||
<el-table-column min-width="120" show-overflow-tooltip prop="pcsn" label="批次" align="center" />
|
||||
<el-table-column min-width="120" show-overflow-tooltip prop="qty" label="数量" align="center" />
|
||||
<el-table-column min-width="120" show-overflow-tooltip prop="vehicle_code" label="载具" align="center" />
|
||||
<el-table-column min-width="120" show-overflow-tooltip prop="status" label="单据状态" align="center" />
|
||||
<el-table-column min-width="120" show-overflow-tooltip v-for="(item, index) in viewDtlCols" :key="item.value" :label="item.lable" >
|
||||
<template slot-scope="scope">{{scope.row.form_data[item.value]}}</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
</div>
|
||||
<!-- <div v-if="hasDtl">-->
|
||||
<!-- <div class="crud-opts2">-->
|
||||
<!-- <span class="role-span2">明细数据</span>-->
|
||||
<!-- </div>-->
|
||||
<!-- <el-card class="box-card" shadow="never" :body-style="{padding:'0'}">-->
|
||||
<!-- <!–表格渲染–>-->
|
||||
<!-- <el-table-->
|
||||
<!-- ref="table"-->
|
||||
<!-- :data="viewDtl"-->
|
||||
<!-- style="width: 100%;"-->
|
||||
<!-- max-height="300"-->
|
||||
<!-- size="mini"-->
|
||||
<!-- border-->
|
||||
<!-- :highlight-current-row="true"-->
|
||||
<!-- :header-cell-style="{background:'#f5f7fa',color:'#606266'}"-->
|
||||
<!-- >-->
|
||||
<!-- <el-table-column min-width="120" show-overflow-tooltip prop="id" label="id" align="center" />-->
|
||||
<!-- <el-table-column min-width="120" show-overflow-tooltip prop="code" label="单据编码" align="center" />-->
|
||||
<!-- <el-table-column min-width="120" show-overflow-tooltip prop="biz_code" label="业务单" align="center" />-->
|
||||
<!-- <el-table-column min-width="120" show-overflow-tooltip prop="material_id" label="物料id" align="center" />-->
|
||||
<!-- <el-table-column min-width="120" show-overflow-tooltip prop="pcsn" label="批次" align="center" />-->
|
||||
<!-- <el-table-column min-width="120" show-overflow-tooltip prop="qty" label="数量" align="center" />-->
|
||||
<!-- <el-table-column min-width="120" show-overflow-tooltip prop="vehicle_code" label="载具" align="center" />-->
|
||||
<!-- <el-table-column min-width="120" show-overflow-tooltip prop="status" label="单据状态" align="center" />-->
|
||||
<!-- <el-table-column min-width="120" show-overflow-tooltip v-for="(item, index) in viewDtlCols" :key="item.value" :label="item.lable" >-->
|
||||
<!-- <template slot-scope="scope">{{scope.row.form_data[item.value]}}</template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<!-- </el-table>-->
|
||||
<!-- </el-card>-->
|
||||
<!-- </div>-->
|
||||
</div>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button :loading="crud.cu === 2" type="primary" @click="syncAnalyseSubmit">同步解析</el-button>
|
||||
@@ -232,7 +232,7 @@
|
||||
<el-table-column type="selection" width="55" />
|
||||
<el-table-column prop="form_name" label="表单名称" width="150" />
|
||||
<el-table-column prop="form_type" label="表单类型" width="150" />
|
||||
<el-table-column prop="sync_type" label="同步类型" width="150" >
|
||||
<el-table-column prop="sync_type" label="同步类型" width="150">
|
||||
<template slot-scope="scope">
|
||||
{{ dict.label.sync_type[scope.row.sync_type] }}
|
||||
</template>
|
||||
@@ -248,14 +248,13 @@
|
||||
:data="scope.row"
|
||||
:permission="permission"
|
||||
style="display: inline"
|
||||
|
||||
/>
|
||||
<el-button
|
||||
slot="right"
|
||||
class="filter-item"
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
type="text"
|
||||
slot="right"
|
||||
@click="syncTest(scope.row)"
|
||||
>同步测试</el-button>
|
||||
|
||||
@@ -271,7 +270,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import crudFormMapping, {syncData} from './formMapping'
|
||||
import crudFormMapping, { syncData } from './formMapping'
|
||||
import CRUD, { crud, form, header, presenter } from '@crud/crud'
|
||||
import rrOperation from '@crud/RR.operation.vue'
|
||||
import crudOperation from '@crud/CRUD.operation.vue'
|
||||
@@ -279,7 +278,7 @@ import udOperation from '@crud/UD.operation.vue'
|
||||
import pagination from '@crud/Pagination.vue'
|
||||
import AddDialog from './AddDialog'
|
||||
import EditDialog from './EditDialog'
|
||||
import crudNotice from "../../../system/notice/api/notice";
|
||||
import crudNotice from '../../../system/notice/api/notice'
|
||||
|
||||
const defaultForm = {
|
||||
id: null,
|
||||
@@ -373,29 +372,27 @@ export default {
|
||||
querytable1() {
|
||||
this.crud.toQuery()
|
||||
},
|
||||
syncTest(row){
|
||||
syncTest(row) {
|
||||
this.syncShow = true
|
||||
this.syncForm = row
|
||||
crudFormMapping.tableColumns(row.form_type).then(res => {
|
||||
this.viewMstCols = res.item
|
||||
if (res.dtl_item != null){
|
||||
this.hasDtl = true
|
||||
this.viewDtlCols = res.dtl_item
|
||||
}
|
||||
this.viewMstCols = res.item
|
||||
if (res.dtl_item != null) {
|
||||
this.hasDtl = true
|
||||
this.viewDtlCols = res.dtl_item
|
||||
}
|
||||
})
|
||||
},
|
||||
syncAnalyseSubmit(){
|
||||
this.viewMst=[]
|
||||
this.viewDtl = []
|
||||
syncAnalyseSubmit() {
|
||||
this.viewMst = []
|
||||
crudFormMapping.syncAnalyse(this.syncForm).then(res => {
|
||||
this.crud.notify('解析成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
for (let i = 0; i < res.content.length; i++) {
|
||||
if (i==0){this.viewMst.push(res.content[i])}
|
||||
else {this.viewDtl.push(res.content[i])}
|
||||
}
|
||||
this.viewMst.push(res.content[i])
|
||||
}
|
||||
})
|
||||
},
|
||||
syncAnalyseCannel(){
|
||||
syncAnalyseCannel() {
|
||||
this.syncForm = {}
|
||||
this.viewMst = [],
|
||||
this.viewDtl = [],
|
||||
|
||||
Reference in New Issue
Block a user