rev:自定义表单同步功能
This commit is contained in:
@@ -60,6 +60,10 @@
|
||||
<el-form-item label="长度" prop="length">
|
||||
<el-input v-model="form.length" style="width: 370px;" />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="当前值" prop="max_value">
|
||||
<el-input v-model="form.current_value" style="width: 370px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="最大值" prop="max_value">
|
||||
<el-input v-model="form.max_value" style="width: 370px;" />
|
||||
</el-form-item>
|
||||
|
||||
@@ -177,7 +177,7 @@
|
||||
<el-option
|
||||
v-for="item in dict.storagevehicle_type"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
:value="item.para1"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
@@ -188,6 +188,38 @@
|
||||
<el-form-item label="载具数量" prop="num">
|
||||
<el-input-number v-model="form.num" :precision="0" style="width: 150px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="高度(mm)" prop="h">
|
||||
<el-input-number v-model="form.h" :precision="0" style="width: 150px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="宽度(mm)" prop="w">
|
||||
<el-input-number v-model="form.w" :precision="0" style="width: 150px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="深度(mm)" prop="l">
|
||||
<el-input-number v-model="form.l" :precision="0" style="width: 150px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="重量(g)" prop="weight">
|
||||
<el-input-number v-model="form.weight" :precision="0" style="width: 150px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="是否超限" prop="overstruct_type">
|
||||
<el-select
|
||||
v-model="form.overstruct_type"
|
||||
style="width: 150px"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="超限类型"
|
||||
class="filter-item"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.VEHICLE_OVER_TYPE"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="form.overstruct_type !=='0'" label="超限货位" prop="occupystruct_qty">
|
||||
<el-input-number v-model="form.occupystruct_qty" :precision="0" style="width: 150px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="是否启用">
|
||||
<el-radio v-model="form.is_used" label="0">否</el-radio>
|
||||
<el-radio v-model="form.is_used" label="1">是</el-radio>
|
||||
@@ -209,7 +241,7 @@
|
||||
@selection-change="crud.selectionChangeHandler"
|
||||
>
|
||||
<el-table-column type="selection" width="55" />
|
||||
<el-table-column prop="storagevehicle_type" label="载具类型">
|
||||
<el-table-column prop="vehicle_type" label="载具类型">
|
||||
<template slot-scope="scope">
|
||||
{{ dict.label.storagevehicle_type[scope.row.vehicle_type] }}
|
||||
</template>
|
||||
@@ -289,14 +321,14 @@ const defaultForm = {
|
||||
l: null,
|
||||
h: null,
|
||||
weight: null,
|
||||
overstruct_type: null,
|
||||
occupystruct_qty: null,
|
||||
overstruct_type: '0',
|
||||
occupystruct_qty: '1',
|
||||
ext_json: null,
|
||||
num: '1'
|
||||
}
|
||||
export default {
|
||||
name: 'Storagevehicleinfo',
|
||||
dicts: ['storagevehicle_type'],
|
||||
dicts: ['storagevehicle_type',"VEHICLE_OVER_TYPE"],
|
||||
components: { pagination, crudOperation, rrOperation, udOperation },
|
||||
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||
cruds() {
|
||||
@@ -371,6 +403,9 @@ export default {
|
||||
[CRUD.HOOK.beforeRefresh]() {
|
||||
return true
|
||||
},
|
||||
onCloseDialog(){
|
||||
this.form=defaultForm
|
||||
},
|
||||
queryMater(index, row) {
|
||||
this.materialShow = true
|
||||
},
|
||||
|
||||
@@ -128,6 +128,25 @@
|
||||
<el-button :loading="crud.cu === 2" type="primary" @click="crud.submitCU">确认</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<el-dialog
|
||||
:close-on-click-modal="false"
|
||||
title="表单同步测试"
|
||||
:visible.sync=syncShow
|
||||
width="600px"
|
||||
@close="syncTestCannel"
|
||||
>
|
||||
<el-form ref="form" :model="syncForm" :rules="rules" size="mini" label-width="50px">
|
||||
<el-form-item label="表单:" prop="occupystruct_qty">
|
||||
<el-input disabled v-model="syncForm.form_name" :precision="0" style="width: 150px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="测试数据" prop="testData">
|
||||
<el-input type="textarea" v-model="syncForm.testData" :precision="0" style="width: 450px;" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button :loading="crud.cu === 2" type="primary" @click="syncTestSubmit">同步</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<!--表格渲染-->
|
||||
<el-table
|
||||
ref="table"
|
||||
@@ -138,24 +157,30 @@
|
||||
@selection-change="crud.selectionChangeHandler"
|
||||
>
|
||||
<el-table-column type="selection" width="55" />
|
||||
<el-table-column prop="form_name" label="表单名称" width="120" />
|
||||
<el-table-column prop="form_type" label="表单类型" width="120" />
|
||||
<el-table-column prop="sync_type" label="同步方式" width="120" />
|
||||
<el-table-column prop="sync_url" label="同步配置" width="120" />
|
||||
<el-table-column prop="mapping_json" :show-overflow-tooltip="true" :formatter="jsonFormat" label="字段映射关系" width="120" />
|
||||
<el-table-column prop="update_name" label="更新人" width="120" />
|
||||
<el-table-column prop="update_time" label="更新事件" width="120" />
|
||||
<!-- <el-table-column prop="sync_type" label="同步类型">-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- {{ dict.label.sync_type[scope.row.sync_type] }}-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<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" >
|
||||
<template slot-scope="scope">
|
||||
{{ dict.label.sync_type[scope.row.sync_type] }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="sync_url" label="同步配置" width="210" />
|
||||
<el-table-column prop="mapping_json" :show-overflow-tooltip="true" :formatter="jsonFormat" label="字段映射关系" width="210" />
|
||||
<el-table-column prop="update_name" label="更新人" width="150" />
|
||||
<el-table-column prop="update_time" label="更新时间" width="150" />
|
||||
<el-table-column v-permission="[]" label="操作" width="120px" align="center" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<udOperation
|
||||
:data="scope.row"
|
||||
:permission="permission"
|
||||
/>
|
||||
<el-button
|
||||
class="filter-item"
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
type="warning"
|
||||
@click="syncTest(scope.row)"
|
||||
>同步测试</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@@ -215,6 +240,8 @@ export default {
|
||||
dataTypeList: [],
|
||||
addShow: false,
|
||||
editShow: false,
|
||||
syncShow: false,
|
||||
syncForm: {},
|
||||
permission: {},
|
||||
rules: {
|
||||
position_code: [
|
||||
@@ -262,6 +289,16 @@ export default {
|
||||
},
|
||||
querytable1() {
|
||||
this.crud.toQuery()
|
||||
},
|
||||
syncTest(row){
|
||||
this.syncShow = true
|
||||
this.syncForm = row
|
||||
},
|
||||
syncTestSubmit(){
|
||||
this.crud.notify('操作成功'+row.form_type, CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
},
|
||||
syncTestCannel(){
|
||||
this.syncForm = {}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user