20220803-qian

zhc4dev
lenovo 2 years ago
parent 016b963ba9
commit c57f1a612d
  1. 68
      ant-design-vue-jeecg/src/views/operationtool/ZyOperationtoolList.vue
  2. 50
      ant-design-vue-jeecg/src/views/operationtool/modules/ZyOperationtoolForm.vue
  3. 12
      ant-design-vue-jeecg/src/views/operationtool/modules/ZyOperationtoolModal.vue

@ -4,6 +4,22 @@
<div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
<a-col :sm="5">
<a-form-model-item label="工序" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="annual" >
<a-input v-model="queryParam.operationid" placeholder="请输入工序" ></a-input>
</a-form-model-item>
</a-col>
<a-col :sm="5">
<a-form-model-item label="设备" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="organizer">
<a-input v-model="queryParam.toolid" placeholder="请输入工具名称" ></a-input>
</a-form-model-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
<a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
<a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
</span>
</a-col>
</a-row>
</a-form>
</div>
@ -13,17 +29,17 @@
<div class="table-operator">
<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
<a-button type="primary" icon="download" @click="handleExportXls('工序工具')">导出</a-button>
<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
<a-button type="primary" icon="import">导入</a-button>
</a-upload>
<!-- <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">-->
<!-- <a-button type="primary" icon="import">导入</a-button>-->
<!-- </a-upload>-->
<!-- 高级查询区域 -->
<j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>
<a-dropdown v-if="selectedRowKeys.length > 0">
<a-menu slot="overlay">
<a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>
</a-menu>
<a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>
</a-dropdown>
<!-- <j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>-->
<!-- <a-dropdown v-if="selectedRowKeys.length > 0">-->
<!-- <a-menu slot="overlay">-->
<!-- <a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>-->
<!-- </a-menu>-->
<!-- <a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>-->
<!-- </a-dropdown>-->
</div>
<!-- table区域-begin -->
@ -71,19 +87,13 @@
<a @click="handleEdit(record)">编辑</a>
<a-divider type="vertical" />
<a-dropdown>
<a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
<a-menu slot="overlay">
<a-menu-item>
<a @click="handleDetail(record)">详情</a>
</a-menu-item>
<a-menu-item>
<a-divider type="vertical" />
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a>删除</a>
</a-popconfirm>
</a-menu-item>
</a-menu>
</a-dropdown>
</span>
</a-table>
@ -109,6 +119,15 @@
},
data () {
return {
labelCol: {
xs: { span: 24 },
sm: { span: 7 },
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 12 },
md: { span: 10 },
},
description: '工序工具管理页面',
//
columns: [
@ -122,20 +141,25 @@
return parseInt(index)+1;
}
},
{
title:'工序编号',
align:"center",
dataIndex: 'operationid'
},
{
title:'工序',
align:"center",
dataIndex: 'operationid_dictText'
},
{
title:'机器',
title:'工具编号',
align:"center",
dataIndex: 'device_dictText'
dataIndex: 'toolid'
},
{
title:'工具',
align:"center",
dataIndex: 'tools'
dataIndex: 'toolid_dictText'
},
{
title: '操作',

@ -3,19 +3,43 @@
<j-form-container :disabled="formDisabled">
<a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
<a-row>
<a-col :span="24">
<a-col :span="24" v-if="this.id===''&&code===1">
<a-form-model-item label="工序" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="operationid">
<j-dict-select-tag type="list" v-model="model.operationid" dictCode="zy_process,process_name,id" placeholder="请选择工序" />
<!-- <j-dict-select-tag type="list" v-model="model.operationid" dictCode="zy_process,process_name,id" placeholder="请选择工序" />-->
<j-popup
v-model="model.operationid"
field="operationid"
org-fields="id,process_name"
dest-fields="operationid,operationid"
code="use_g"
:disabled="true"
/>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="机器" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="device">
<j-dict-select-tag type="list" v-model="model.device" dictCode="zy_devicetype,name,id" placeholder="请选择机器" />
<a-col :span="24" v-else-if="this.id===''">
<a-form-model-item label="工序" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="operationid">
<!-- <j-dict-select-tag type="list" v-model="model.operationid" dictCode="zy_process,process_name,id" placeholder="请选择工序" />-->
<j-popup
v-model="model.operationid"
field="operationid"
org-fields="id,process_name"
dest-fields="operationid,operationid"
code="use_g"
/>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="工具" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="tools">
<a-input v-model="model.tools" placeholder="请输入工具" ></a-input>
<a-form-model-item label="工具" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="toolid">
<!-- <j-dict-select-tag type="list" v-model="model.toolid" dictCode="zy_devicetype,name,id" placeholder="请选择机器" />-->
<j-popup
v-model="model.toolid"
field="toolid"
org-fields="id,descr"
dest-fields="toolid,toolid"
code="zy_tools"
/>
</a-form-model-item>
</a-col>
</a-row>
@ -43,6 +67,8 @@
},
data () {
return {
id:'',
code:'',
model:{
},
labelCol: {
@ -76,10 +102,20 @@
add () {
this.edit(this.modelDefault);
},
add1 (id) {
this.id=id;
this.model.operationid=id;
console.log(this.model.processId)
},
edit (record) {
this.model = Object.assign({}, record);
this.visible = true;
},
edit1 (record,code) {
this.model = Object.assign({}, record);
this.code=code;
this.visible = true;
},
submitForm () {
const that = this;
//

@ -35,12 +35,24 @@
this.$refs.realForm.add();
})
},
add1 (id) {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.add1(id);
})
},
edit (record) {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.edit(record);
})
},
edit1 (record,code) {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.edit1(record,code);
})
},
close () {
this.$emit('close');
this.visible = false;

Loading…
Cancel
Save