| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336 |
- <template>
- <el-dialog
- title="详情"
- :visible.sync="visible"
- :before-close="handleClose"
- :close-on-click-modal="false"
- :close-on-press-escape="false"
- append-to-body
- width="80%"
- >
- <el-form ref="form" label-width="100px" class="create-form">
- <headerTitle title="基本信息" style="margin-top: 15px"></headerTitle>
- <el-row :gutter="15">
- <el-col :span="6">
- <el-form-item label="委外单编码:" prop="code">
- <el-input v-model="row.code" disabled />
- </el-form-item>
- </el-col>
- <el-col :span="6">
- <el-form-item label="委外单名称:" prop="name">
- <el-input v-model="row.name" disabled />
- </el-form-item>
- </el-col>
- <el-col :span="6">
- <el-form-item label="委外发起工序:" prop="taskName">
- <el-input v-model="row.taskName" disabled />
- </el-form-item>
- </el-col>
- <el-col :span="6">
- <el-form-item label="委外工序:" prop="taskNames">
- <el-input v-model="row.taskNames" disabled />
- </el-form-item>
- </el-col>
- <el-col :span="6">
- <el-form-item label="工单编码:" prop="factoriesName">
- <el-input v-model="row.workOrderCode" style="width: 100%" disabled>
- </el-input>
- </el-form-item>
- </el-col>
- <el-col :span="6">
- <el-form-item label="预计到货日期:" prop="factoriesName">
- <el-input
- v-model="row.requireDeliveryTime"
- style="width: 100%"
- disabled
- >
- </el-input>
- </el-form-item>
- </el-col>
- <el-col :span="6">
- <el-form-item label="创建时间:" prop="factoriesName">
- <el-input v-model="row.createTime" style="width: 100%" disabled>
- </el-input>
- </el-form-item>
- </el-col>
- <el-col :span="6">
- <el-form-item label="状态:" prop="status">
- <el-tag>{{
- row.status == 0 ? '未提交' : row.status == 1 ? '已提交' : '已发布'
- }}</el-tag>
- </el-form-item>
- </el-col>
- </el-row>
- </el-form>
- <!-- 数据表格 -->
- <ele-pro-table
- ref="table"
- v-if="detailType == 1"
- :columns="columns"
- :datasource="row.detailList"
- cache-key="detailsTable"
- height="calc(100vh - 350px)"
- >
- <template v-slot:totalCount="{ row }">
- {{ row.totalCount }}{{ row.measuringUnit }}
- </template>
- <template v-slot:sourceType="{ row }">
- <el-tag v-if="row.sourceType == 1" size="mini" type="success"
- >物品清单</el-tag
- >
- <el-tag v-if="row.sourceType == 2" size="mini" type="warning"
- >带料清单</el-tag
- >
- <el-tag v-if="row.sourceType == 3" size="mini" type="danger"
- >产出清单</el-tag
- >
- </template>
- </ele-pro-table>
- <ele-pro-table
- ref="table2"
- v-if="detailType == 2"
- :datasource="row.detailList"
- :columns="columns2"
- cache-key="detailsTable2"
- height="calc(100vh - 350px)"
- >
- <template v-slot:totalCount="{ row }">
- {{ row.totalCount }}{{ row.measuringUnit }}
- </template>
- <template v-slot:totalWeight="{ row }">
- {{ row.totalWeight }}{{ row.weightUnit }}
- </template>
- <template v-slot:sourceType="{ row }">
- <el-tag v-if="row.sourceType == 1" size="mini" type="success"
- >物品清单</el-tag
- >
- <el-tag v-if="row.sourceType == 2" size="mini" type="warning"
- >带料清单</el-tag
- >
- <el-tag v-if="row.sourceType == 3" size="mini" type="danger"
- >产出清单</el-tag
- >
- </template>
- </ele-pro-table>
- </el-dialog>
- </template>
- <script>
- export default {
- components: {},
- data() {
- return {
- visible: false,
- detailTitle: null,
- row: {},
- detailType: ''
- };
- },
- computed: {
- // 表格列配置
- columns() {
- return [
- {
- columnKey: 'index',
- label: '序号',
- type: 'index',
- width: 55,
- align: 'center',
- showOverflowTooltip: true,
- fixed: 'left'
- },
- {
- prop: 'categoryCode',
- label: '编码',
- align: 'center',
- showOverflowTooltip: true
- },
- {
- prop: 'categoryName',
- label: '名称',
- align: 'center',
- showOverflowTooltip: true
- },
- {
- prop: 'sourceType',
- slot: 'sourceType',
- label: '类型',
- align: 'center',
- showOverflowTooltip: true
- },
- {
- prop: 'brandNum',
- label: '牌号',
- align: 'center',
- showOverflowTooltip: true
- },
- {
- prop: 'specification',
- label: '规格',
- align: 'center',
- showOverflowTooltip: true
- },
- {
- prop: 'modelType',
- label: '型号',
- align: 'center',
- showOverflowTooltip: true
- },
- {
- slot: 'totalCount',
- label: '数量',
- align: 'center',
- showOverflowTooltip: true
- }
- ];
- },
- columns2() {
- return [
- {
- columnKey: 'index',
- label: '序号',
- type: 'index',
- width: 55,
- align: 'center',
- showOverflowTooltip: true,
- fixed: 'left'
- },
- {
- prop: 'categoryCode',
- label: '编码',
- align: 'center',
- showOverflowTooltip: true
- },
- {
- prop: 'categoryName',
- label: '名称',
- align: 'center',
- showOverflowTooltip: true
- },
- {
- prop: 'sourceType',
- slot: 'sourceType',
- label: '类型',
- align: 'center',
- showOverflowTooltip: true
- },
- {
- prop: 'brandNum',
- label: '牌号',
- align: 'center',
- showOverflowTooltip: true
- },
- {
- prop: 'modelType',
- label: '型号',
- align: 'center',
- showOverflowTooltip: true
- },
- {
- prop: 'specification',
- label: '规格',
- align: 'center',
- showOverflowTooltip: true
- },
- {
- label: '物料代号',
- prop: 'extInfo.materielCode',
- align: 'center',
- showOverflowTooltip: true
- },
- {
- label: '客户代号',
- prop: 'extInfo.clientCode',
- align: 'center',
- showOverflowTooltip: true
- },
- {
- label: '刻码',
- prop: 'extInfo.engrave',
- align: 'center',
- showOverflowTooltip: true
- },
- {
- label: '重量',
- prop: 'totalWeight',
- slot: 'totalWeight',
- align: 'center',
- showOverflowTooltip: true
- },
- {
- slot: 'totalCount',
- label: '数量',
- align: 'center',
- showOverflowTooltip: true
- }
- ];
- },
- clientEnvironmentId() {
- return this.$store.state.user.info.clientEnvironmentId;
- }
- },
- watch: {},
- methods: {
- open(row) {
- this.visible = true;
- // if (row.detailTitle == 1) {
- // this.detailType = 1;
- // this.$nextTick(() => {
- // this.$refs.table.setData([...row.detailList]);
- // });
- // } else if (row.detailTitle == 2) {
- // this.detailType = 2;
- // this.$nextTick(() => {
- // this.$refs.table2.setData([...row.detailList]);
- // });
- // }
- if (row.detailType == 1) {
- this.detailType = 1;
- // this.$nextTick(() => {
- // this.$refs.table.setData([...row.detailList]);
- // });
- } else if (row.detailType == 2) {
- this.detailType = 2;
- // this.$nextTick(() => {
- // this.$refs.table2.setData([...row.detailList]);
- // });
- }
- console.log(row, 'row 123');
- this.row = row;
- },
- handleClose() {
- this.visible = false;
- }
- }
- };
- </script>
- <style lang="scss" scoped></style>
|