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

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

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

Loading…
Cancel
Save