|
|
@@ -1,10 +1,207 @@
|
|
|
+<!-- @desc:窑车状态表 @auth:王英杰 @time:2023/3/4 19:31 -->
|
|
|
<template>
|
|
|
|
|
|
+ <div class="main-div" ref="mainDiv">
|
|
|
+ <!--加载中-->
|
|
|
+ <loading :loading="loading"></loading>
|
|
|
+
|
|
|
+ <BaseIndexButtonGroup id="BaseIndexButtonGroup">
|
|
|
+ <template #left>
|
|
|
+ <!-- 查询 -->
|
|
|
+ <BaseIndexButton right-button="mould-select" ref="search" name="search"></BaseIndexButton>
|
|
|
+ <!-- 清空条件 -->
|
|
|
+ <BaseIndexButton right-button="mould-check-clear" ref="clear" name="clear"></BaseIndexButton>
|
|
|
+ </template>
|
|
|
+ </BaseIndexButtonGroup>
|
|
|
+
|
|
|
+ <!-- 查询条件区域 -->
|
|
|
+ <div id="search-cond-div" ref="search-cond-div" style="margin-top: 1px;padding: 0">
|
|
|
+ <SearchCond ref="searchCond" v-model="searchCond"
|
|
|
+ @collapse-change="collapseChange" :setFlag="false"
|
|
|
+ :searchContent="searchContent"></SearchCond>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <!-- 表格部分 -->
|
|
|
+ <div :style="'height: ' + tableHeight + 'px'" class="split-div-class">
|
|
|
+ <DkSplit mode="vertical" v-model="split" :height="tableHeight">
|
|
|
+ <DkTable slot="top" :id="'table-'+$options.name" ref="table-select" :data="tableData" multiple
|
|
|
+ :height="this.tableHeight * split - 45" primaryKey="uniqueId" @pageChange="pageSizeChange"
|
|
|
+ :pageFlag="true"
|
|
|
+ :page-total="pageInfo.total"
|
|
|
+ :current-page="pageInfo.currentPage"
|
|
|
+ @current-change="currentChange($event)"
|
|
|
+ name="table">
|
|
|
+ <!-- 窑炉编码 -->
|
|
|
+ <DkTableColumn field="kilnCode" width="200px" type="link"
|
|
|
+ @on-link="handleLink(Object.assign($event,{button:'edit'}))"></DkTableColumn>
|
|
|
+ <!-- 窑炉类型 -->
|
|
|
+ <DkTableColumn field="kilnType"></DkTableColumn>
|
|
|
+ <!-- 窑车编码 -->
|
|
|
+ <DkTableColumn field="carCode" data-type="number"></DkTableColumn>
|
|
|
+ <!-- 当前工序 -->
|
|
|
+ <DkTableColumn field="currentNode" data-type="number"></DkTableColumn>
|
|
|
+
|
|
|
+
|
|
|
+ </DkTable>
|
|
|
+
|
|
|
+ <!--明细-->
|
|
|
+ <div slot="bottom">
|
|
|
+ <DkTabs v-model="detailModel" :options="detailOptions" @on-click="detailTabsClick"> </DkTabs>
|
|
|
+ <!--生产数据-->
|
|
|
+ <DkTable v-show ="detailModel===this.$config.KilnCarStatusText.productionData" :pageFlag="true" multiple primaryKey="itemId"
|
|
|
+ :id="'table-'+$options.name"
|
|
|
+ :height="this.tableHeight * (1-split) - 15"
|
|
|
+ ref="not-counted-select"
|
|
|
+ name="notCountedTable"
|
|
|
+ :linkClickChecked="true"
|
|
|
+ :data="productionDataData">
|
|
|
+ <!-- 当前工序-->
|
|
|
+ <DkTableColumn field="currentNode" width="180px"></DkTableColumn>
|
|
|
+ <!-- 开始时间-->
|
|
|
+ <DkTableColumn field="startTime"></DkTableColumn>
|
|
|
+ <!-- 生产工号-->
|
|
|
+ <DkTableColumn field="makeUserId"></DkTableColumn>
|
|
|
+ <!-- 操作者-->
|
|
|
+ <DkTableColumn field="opnUserName"></DkTableColumn>
|
|
|
+ </DkTable>
|
|
|
+
|
|
|
+ <!--窑车产品-->
|
|
|
+ <DkTable v-show ="detailModel===this.$config.KilnCarStatusText.KilnCarProducts" :pageFlag="true" multiple primaryKey="itemId"
|
|
|
+
|
|
|
+ :id="'table-'+$options.name"
|
|
|
+ :height="this.tableHeight * (1-split) - 15"
|
|
|
+ ref="counted-select"
|
|
|
+ name="countedTable"
|
|
|
+ :choose-flag="false"
|
|
|
+ :data="kilnCarProductsData">
|
|
|
+ <!-- 产品条码-->
|
|
|
+ <DkTableColumn field="pdtBarcode"></DkTableColumn>
|
|
|
+ <!-- 产品编码-->
|
|
|
+ <DkTableColumn field="productCode"></DkTableColumn>
|
|
|
+
|
|
|
+ <!-- 生产工号-->
|
|
|
+ <DkTableColumn field="prodUserCode"></DkTableColumn>
|
|
|
+ <!-- 员工姓名-->
|
|
|
+ <DkTableColumn field="staffNames"></DkTableColumn>
|
|
|
+ <!-- 操作时间-->
|
|
|
+ <DkTableColumn field="operationTime"></DkTableColumn>
|
|
|
+ <!-- 操作者-->
|
|
|
+ <DkTableColumn field="opnUserName"></DkTableColumn>
|
|
|
+ </DkTable>
|
|
|
+
|
|
|
+
|
|
|
+ </div>
|
|
|
+ </DkSplit>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ </div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
+import {indexMixin} from "@/mixins";
|
|
|
+import PrintModal from "_c/business/print/modal.vue";
|
|
|
+
|
|
|
export default {
|
|
|
-name: "kiln-car-status-report"
|
|
|
+ name: "kiln-car-status-report",
|
|
|
+ mixins: [indexMixin],
|
|
|
+ components: {PrintModal},
|
|
|
+ data() {
|
|
|
+ let self = this
|
|
|
+ return {
|
|
|
+ productionDataData: [],//生产数据数据源
|
|
|
+ kilnCarProductsData: [],//窑车产品数据
|
|
|
+ searchContent:
|
|
|
+ [
|
|
|
+ // 窑炉编码
|
|
|
+ {
|
|
|
+ itemCode: 'kilnCode',
|
|
|
+ },
|
|
|
+ // 窑炉车号
|
|
|
+ {
|
|
|
+ itemCode: 'carNo',
|
|
|
+ }],
|
|
|
+ //明细tab默认
|
|
|
+ detailModel: self.$config.KilnCarStatusText.productionData,
|
|
|
+ //明细tab可选
|
|
|
+ detailOptions: [{label: self.$t('productionData'), name: self.$config.KilnCarStatusText.productionData}, //生产数据
|
|
|
+ {label: self.$t('KilnCarProducts'), name: self.$config.KilnCarStatusText.KilnCarProducts},//窑车产品
|
|
|
+ ],
|
|
|
+ checkId: null,//总单id
|
|
|
+ }
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ /**
|
|
|
+ * @desc : 行点击事件
|
|
|
+ * @date : 2023/2/27 14:11
|
|
|
+ * @author : 寇珊珊
|
|
|
+ */
|
|
|
+ currentChange({row}) {
|
|
|
+ console.log("woaini", row)
|
|
|
+ if (row != null) {
|
|
|
+ this.checkId = row.checkId
|
|
|
+ if (this.tableData && this.tableData.length > 0) {
|
|
|
+ // this.getDetail(1)
|
|
|
+ this.getCarrierFlow(row.carrierId)
|
|
|
+ this.getProduction(row.carrierId)
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ /**
|
|
|
+ * @desc : 明细切换
|
|
|
+ * @date : 2023/3/24 13:19
|
|
|
+ * @author : 王英杰
|
|
|
+ */
|
|
|
+ detailTabsClick(val) {
|
|
|
+ if (val) {
|
|
|
+ this.detailModel = val
|
|
|
+console.log("1111", this.detailModel)
|
|
|
+ // this.getDetail(1)
|
|
|
+ }
|
|
|
+ },
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @desc : 查询总单 item对应的 窑车产品
|
|
|
+ * @author : 王英杰
|
|
|
+ * @date : 2023/4/28 16:42
|
|
|
+ */
|
|
|
+ getCarrierFlow(carrierId) {
|
|
|
+
|
|
|
+ this.excute(this.$service.reportCarrieFlowService, this.$service.reportCarrieFlowService.selectCarrierFlow, {"carrierId": carrierId}).then(res => {
|
|
|
+ if (res.code === this.$config.SUCCESS_CODE) {
|
|
|
+ this.kilnCarProductsData = res.data
|
|
|
+
|
|
|
+ console.log("kilnCarProductsData", this.kilnCarProductsData);
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ /**
|
|
|
+ * @desc : //查询总单 item对应的 生产数据
|
|
|
+ * @author : 王英杰
|
|
|
+ * @date : 2023/4/28 16:42
|
|
|
+ */
|
|
|
+ getProduction(carrierId) {
|
|
|
+ this.excute(this.$service.reportCarrieFlowService, this.$service.reportCarrieFlowService.selectProduction, {"carrierId": carrierId}).then(res => {
|
|
|
+ if (res.code === this.$config.SUCCESS_CODE) {
|
|
|
+ this.productionDataData = res.data
|
|
|
+ console.log("productionDataData", this.productionDataData);
|
|
|
+
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ /**
|
|
|
+ * @desc : 获取查询数据
|
|
|
+ * @author : 王英杰
|
|
|
+ * @date : 2023/4/28 14:07
|
|
|
+ */
|
|
|
+ getData(params) {
|
|
|
+ return this.excute(this.$service.reportCarrieFlowService, this.$service.reportCarrieFlowService.selectByCond, params)
|
|
|
+ },
|
|
|
+
|
|
|
+ },
|
|
|
+ created() {
|
|
|
+ this.routeObjName = 'KilnCarStatusReport' // 设置路由名称
|
|
|
+ }
|
|
|
}
|
|
|
</script>
|
|
|
|