|
|
@@ -8,131 +8,176 @@
|
|
|
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>
|
|
|
+ <div class="switch" v-if="type == 'detail'" :maxable="true">
|
|
|
+ <div class="switch_left">
|
|
|
+ <ul>
|
|
|
+ <li
|
|
|
+ v-for="item in tabOptions"
|
|
|
+ :key="item.key"
|
|
|
+ :class="{ active: activeComp == item.key }"
|
|
|
+ @click="activeComp = item.key"
|
|
|
+ >
|
|
|
+ {{ item.name }}
|
|
|
+ </li>
|
|
|
+ </ul>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div v-if="activeComp == 'detail'">
|
|
|
+ <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>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <send-receiving-detail
|
|
|
+ v-if="activeComp == 'send'"
|
|
|
+ :item="row"
|
|
|
+ :type="activeComp"
|
|
|
+ ></send-receiving-detail>
|
|
|
+
|
|
|
+ <send-receiving-detail
|
|
|
+ v-if="activeComp == 'receiving'"
|
|
|
+ :item="row"
|
|
|
+ :type="activeComp"
|
|
|
+ ></send-receiving-detail>
|
|
|
</el-dialog>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
+ import sendReceivingDetail from './sendReceivingDetail.vue';
|
|
|
export default {
|
|
|
- components: {},
|
|
|
+ components: { sendReceivingDetail },
|
|
|
+
|
|
|
data() {
|
|
|
return {
|
|
|
visible: false,
|
|
|
detailTitle: null,
|
|
|
row: {},
|
|
|
- detailType: ''
|
|
|
+ detailType: '',
|
|
|
+ activeComp: 'detail',
|
|
|
+ tabOptions: [
|
|
|
+ { key: 'detail', name: '委外详情' },
|
|
|
+ { key: 'send', name: '收货详情' },
|
|
|
+ { key: 'receiving', name: '发货详情' }
|
|
|
+ ],
|
|
|
+ type: ''
|
|
|
};
|
|
|
},
|
|
|
|
|
|
@@ -299,32 +344,14 @@
|
|
|
|
|
|
watch: {},
|
|
|
methods: {
|
|
|
- open(row) {
|
|
|
+ open(row, type) {
|
|
|
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]);
|
|
|
- // });
|
|
|
- // }
|
|
|
-
|
|
|
+ this.type = type;
|
|
|
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;
|
|
|
},
|
|
|
|