车间工位管理修改 12.7

zhc4dev
zhc077 2 years ago
parent a9e24c0282
commit ce675ff042
  1. 16
      ant-design-vue-jeecg/src/views/team/StationList.vue
  2. 90
      ant-design-vue-jeecg/src/views/team/StationToolList.vue
  3. 39
      ant-design-vue-jeecg/src/views/team/modules/StationToolModal.vue

@ -188,19 +188,19 @@ export default {
jumpPage1(record) {
this.$router.push({
path: '/team/stationMachineList',
// query: { //
// 'id': record.id,
// // 'styleNames': record.styleNames,
// },
query: { //
'id': record.id,
'stationName': record.stationName,
},
});
},
jumpPage2(record) {
this.$router.push({
path: '/team/StationToolList',
// query: { //
// 'id': record.stationId,
// // 'styleNames': record.styleNames,
// },
query: { //
'stationId': record.id,
'stationName': record.stationName,
},
});
},
}

@ -31,7 +31,8 @@
<!-- 操作按钮区域 -->
<div class="table-operator">
<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
<a-button @click="zyStyleFabricHandleAdd(stationId)" 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-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl"-->
<!-- @change="handleImportExcel">-->
@ -49,7 +50,6 @@
</a-button>
</a-dropdown>
<a-button type="primary" @click="fanHui()">返回</a-button>
</div>
<!-- table区域-begin -->
@ -96,7 +96,7 @@
<!-- table区域-end -->
<!-- 表单区域 -->
<stationTool-modal ref="modalForm" @ok="modalFormOk"></stationTool-modal>
<stationTool-modal @valueChange="valueChange" ref="modalForm" @ok="modalFormOk"></stationTool-modal>
</a-card>
</template>
@ -105,6 +105,8 @@ import '@/assets/less/TableExpand.less'
import {mixinDevice} from '@/utils/mixin'
import StationToolModal from './modules/StationToolModal'
import {JeecgListMixin} from '@/mixins/JeecgListMixin'
import {getAction} from "@api/manage";
import {filterObj} from "@/utils/util";
export default {
name: "StationToolList",
@ -132,6 +134,11 @@ export default {
align: "center",
dataIndex: 'stationId'
},
{
title: '工位名称',
align: "center",
dataIndex: 'stationName',
},
{
title: '工具ID',
align: "center",
@ -151,8 +158,17 @@ export default {
exportXlsUrl: "/stationTool/exportXls",
importExcelUrl: "/stationTool/importExcel",
},
//
loadRouteType: false,
stationId: "",
stationName: "",
dictOptions: {},
superFieldList: [],
}
},
created() {
this.loadParameter();
},
computed: {
importExcelUrl: function () {
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
@ -161,14 +177,70 @@ export default {
methods: {
fanHui() {
this.$router.push({
path: '/team/StationList',
// query: { //
// 'id': record.id,
// 'typeId': record.typeId,
// }
// });
path: '/src/views/team/StationList',
// path: '/src/views/zyclothsstyle/ZyClothsStyleList',
});
},
// initDictConfig() {
// },
valueChange(value) {
if (value) this.loadData()
},
//
loadParameter() {
if (this.loadRouteType === false) {
this.stationId = this.$route.query.stationId;
this.stationName = this.$route.query.stationName;
// this.biaoTi = this.$route.query.styleNames+"";
// console.log("*******stationId:" + this.stationId)
this.loadRouteType = true;
}
},
loadData(arg) {
if (!this.url.list) {
this.$message.error("请设置url.list属性!")
return
}
// 1
if (arg === 1) {
this.ipagination.current = 1;
}
this.loadParameter();
var params = this.getQueryParams();//
this.loading = true;
console.log("----------------the params:", params);
getAction(this.url.list, params).then((res) => {
if (res.success) {
this.dataSource = res.result.records || res.result;
if (res.result.total) {
this.ipagination.total = res.result.total;
} else {
this.ipagination.total = 0;
}
} else {
this.$message.warning(res.message)
}
}).finally(() => {
this.dataSource.forEach(item => {
item['stationName'] = this.stationName;
})
this.loading = false
})
},
getQueryParams() {
//
let sqp = {}
if (this.superQueryParams) {
sqp['superQueryParams'] = encodeURI(this.superQueryParams)
sqp['superQueryMatchType'] = this.superQueryMatchType
}
var param = Object.assign(sqp, this.queryParam, this.isorter, this.filters);
param.field = this.getQueryField();
param.pageNo = this.ipagination.current;
param.pageSize = this.ipagination.pageSize;
param.stationId = this.stationId;
return filterObj(param);
},
}
}
</script>

@ -11,15 +11,19 @@
<a-spin :spinning="confirmLoading">
<a-form-model ref="form" :model="model" :rules="validatorRules">
<a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="stationId" label="车间工位编号">
<!-- <a-input placeholder="请输入部门编号" v-model="model.departId"/>-->
<j-select-depart placeholder="请选择工位" v-model="model.stationId"/>
</a-form-model-item>
<!-- <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="stationId" label="车间工位编号">-->
<!-- <a-input placeholder="车间工位编号" v-model="model.stationId"/>-->
<!--&lt;!&ndash; <j-select-depart placeholder="请选择工位" v-model="model.stationId"/>&ndash;&gt;-->
<!-- </a-form-model-item>-->
<!-- <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="stationId" label="工位ID">-->
<!-- <a-input placeholder="请输入工位ID" v-model="model.stationId" />-->
<!-- </a-form-model-item>-->
<a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="toolsId" label="工具ID">
<a-input placeholder="请输入工具ID" v-model="model.toolsId" />
<!-- <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="toolsId" label="工具ID">-->
<!-- <a-input placeholder="请输入工具ID" v-model="model.toolsId" />-->
<!-- </a-form-model-item>-->
<a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="toolsId" label="工具编号(TODO)">
<!-- <a-input placeholder="请输入部门编号" v-model="model.departId"/>-->
<j-select-depart placeholder="请选择工具" v-model="model.toolsId"/>
</a-form-model-item>
</a-form-model>
@ -37,7 +41,9 @@
return {
title: "操作",
visible: false,
model: {},
model: {
stationId: '',
},
labelCol: {
xs: {span: 24},
sm: {span: 5},
@ -49,6 +55,9 @@
confirmLoading: false,
validatorRules: {
toolId: [
{required: true},
],
},
url: {
add: "/stationTool/add",
@ -57,14 +66,22 @@
}
},
created() {
//model
this.modelDefault = JSON.parse(JSON.stringify(this.model));
},
methods: {
add () {
//
this.edit({});
add(stationId) {
this.model.stationId = stationId;
console.log("mode层接收到上级stationId:--" + this.model.stationId);
this.edit(this.model);
},
// add () {
// //
// this.edit({});
// },
edit(record) {
this.model = Object.assign({}, record);
// console.log("edit()model:----------",this.model);
this.visible = true;
},
close() {
@ -87,6 +104,8 @@
httpurl += this.url.edit;
method = 'put';
}
console.log("----------the add() model:",this.model);
this.model.stationId=
httpAction(httpurl, this.model, method).then((res) => {
if (res.success) {
that.$message.success(res.message);

Loading…
Cancel
Save