|
@@ -1,70 +1,282 @@
|
|
|
<template>
|
|
|
<div>
|
|
|
- <div class="my-title">查看</div>
|
|
|
- <div style="margin-left: 20px; margin-right: 20px">
|
|
|
- <e-desc title="基本信息" column="3">
|
|
|
- <e-desc-item label="项目名称">{{ dataForm.projectName }}</e-desc-item>
|
|
|
- <e-desc-item label="任务号">{{ dataForm.orderCode }}</e-desc-item>
|
|
|
- <e-desc-item label="物料名称">{{ dataForm.productName }}</e-desc-item>
|
|
|
-
|
|
|
- <e-desc-item label="状态">{{ dataForm.stateStr }}</e-desc-item>
|
|
|
- <e-desc-item label="合同交期">{{ dataForm.deliveryDate }}</e-desc-item>
|
|
|
+ <div class="my-title">分派</div>
|
|
|
+ <el-form
|
|
|
+ :model="dataForm"
|
|
|
+ :rules="dataRule"
|
|
|
+ ref="dataForm"
|
|
|
+ label-width="auto"
|
|
|
+ >
|
|
|
+ <el-row class="my-row">
|
|
|
+ <el-col :span="6">
|
|
|
+ <el-form-item label="项目名称:" prop="projectName">
|
|
|
+ <span>{{dataForm.projectName}}</span>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="6">
|
|
|
+ <el-form-item label="任务号:" prop="orderCode">
|
|
|
+ <span>{{dataForm.orderCode}}</span>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="6">
|
|
|
+ <el-form-item label="技术协议:" prop="attachFile1">
|
|
|
+ <span @click="attachDetail(dataForm.attachFile1)">{{dataForm.attachFile1 == null ? '' : dataForm.attachFile1[0].fileName}}</span>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="6">
|
|
|
+ <el-form-item label="资料:" prop="attachFile2">
|
|
|
+ <span @click="attachDetail(dataForm.attachFile1)">{{dataForm.attachFile2 == null ? '' : dataForm.attachFile2[0].fileName}}</span>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
|
|
|
- </e-desc>
|
|
|
- </div>
|
|
|
+ <el-table
|
|
|
+ :data="dataForm.proProductList"
|
|
|
+ border
|
|
|
+ v-loading="dataListLoading"
|
|
|
+ style="width: 100%;">
|
|
|
+ <el-table-column
|
|
|
+ label="序号"
|
|
|
+ type="index"
|
|
|
+ width="100"
|
|
|
+ align="center">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="productName"
|
|
|
+ header-align="center"
|
|
|
+ align="center"
|
|
|
+ min-width="140"
|
|
|
+ :show-tooltip-when-overflow="true"
|
|
|
+ label="名称">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="mapNumber"
|
|
|
+ header-align="center"
|
|
|
+ align="center"
|
|
|
+ min-width="140"
|
|
|
+ :show-tooltip-when-overflow="true"
|
|
|
+ label="图号">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="versionNumber"
|
|
|
+ header-align="center"
|
|
|
+ align="center"
|
|
|
+ min-width="140"
|
|
|
+ :show-tooltip-when-overflow="true"
|
|
|
+ label="版本号">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="attachList2"
|
|
|
+ header-align="center"
|
|
|
+ align="center"
|
|
|
+ min-width="140"
|
|
|
+ :show-tooltip-when-overflow="true"
|
|
|
+ label="简图">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-button :disabled="!scope.row.attachList2 || scope.row.attachList2.length === 0" type="text" size="small" @click="attachDetail(scope.row.attachList2)">查看</el-button>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="productSpec"
|
|
|
+ header-align="center"
|
|
|
+ align="center"
|
|
|
+ min-width="140"
|
|
|
+ :show-tooltip-when-overflow="true"
|
|
|
+ label="规格">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="cnt"
|
|
|
+ header-align="center"
|
|
|
+ align="center"
|
|
|
+ min-width="140"
|
|
|
+ :show-tooltip-when-overflow="true"
|
|
|
+ label="数量">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="unit"
|
|
|
+ header-align="center"
|
|
|
+ align="center"
|
|
|
+ min-width="140"
|
|
|
+ :show-tooltip-when-overflow="true"
|
|
|
+ label="单位">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="materials"
|
|
|
+ header-align="center"
|
|
|
+ align="center"
|
|
|
+ min-width="140"
|
|
|
+ :show-tooltip-when-overflow="true"
|
|
|
+ label="材料">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="size"
|
|
|
+ header-align="center"
|
|
|
+ align="center"
|
|
|
+ min-width="140"
|
|
|
+ :show-tooltip-when-overflow="true"
|
|
|
+ label="净尺寸">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="surfaceTreatment"
|
|
|
+ header-align="center"
|
|
|
+ align="center"
|
|
|
+ min-width="140"
|
|
|
+ :show-tooltip-when-overflow="true"
|
|
|
+ label="表处理">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="heatTreatment"
|
|
|
+ header-align="center"
|
|
|
+ align="center"
|
|
|
+ min-width="140"
|
|
|
+ :show-tooltip-when-overflow="true"
|
|
|
+ label="热处理">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="importance"
|
|
|
+ header-align="center"
|
|
|
+ align="center"
|
|
|
+ min-width="140"
|
|
|
+ :show-tooltip-when-overflow="true"
|
|
|
+ label="关重性">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="appraisal"
|
|
|
+ header-align="center"
|
|
|
+ align="center"
|
|
|
+ min-width="140"
|
|
|
+ :show-tooltip-when-overflow="true"
|
|
|
+ label="是否首件鉴定">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ {{scope.row.appraisal === 2 ? '是' : '否'}}
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="notes"
|
|
|
+ header-align="center"
|
|
|
+ align="center"
|
|
|
+ min-width="140"
|
|
|
+ :show-tooltip-when-overflow="true"
|
|
|
+ label="备注">
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ </el-form>
|
|
|
<span slot="footer" class="dialog-footer">
|
|
|
- <el-button @click="onChose">返回</el-button>
|
|
|
+ <el-button @click="onChose">取消</el-button>
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
+ @click="dataFormSubmit()"
|
|
|
+ v-reClick
|
|
|
+ >确定</el-button
|
|
|
+ >
|
|
|
</span>
|
|
|
|
|
|
- <!-- 文件预览 -->
|
|
|
- <preview-component v-if="previewVisible" ref="preview"/>
|
|
|
+ <attach-detail-dialog ref="attachDetail"/>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import EDesc from '../common/e-desc'
|
|
|
-import EDescItem from '../common/e-desc-item'
|
|
|
-import PreviewComponent from '../common/preview-component'
|
|
|
+import UserComponent from '../common/user-component'
|
|
|
+import AttachDetailDialog from '../common/attach-detail-dialog'
|
|
|
export default {
|
|
|
name: 'project-product-detail',
|
|
|
- components: {
|
|
|
- EDesc,
|
|
|
- EDescItem,
|
|
|
- PreviewComponent
|
|
|
- },
|
|
|
+ components: { UserComponent, AttachDetailDialog },
|
|
|
+ computed: {},
|
|
|
data () {
|
|
|
return {
|
|
|
visible: false,
|
|
|
id: 0,
|
|
|
- dataForm: {},
|
|
|
- previewVisible: false
|
|
|
+ dataForm: {
|
|
|
+ proProductList: []
|
|
|
+ },
|
|
|
+ dataRule: {},
|
|
|
+ dataList: [],
|
|
|
+ dataListLoading: false
|
|
|
}
|
|
|
},
|
|
|
+ created () {},
|
|
|
+ beforeDestroy () {},
|
|
|
methods: {
|
|
|
onChose () {
|
|
|
this.$emit('onChose')
|
|
|
},
|
|
|
async init (item) {
|
|
|
- this.visible = true
|
|
|
+ let id = item.productTechnologyId;
|
|
|
+
|
|
|
+ this.$http({
|
|
|
+ url: this.$http.adornUrl(`/biz-service/projProduct/info/${id}`),
|
|
|
+ method: 'get'
|
|
|
+ }).then(({data}) => {
|
|
|
+ if(data && data.code === '200'){
|
|
|
+ this.dataForm = data.data;
|
|
|
+ } else {
|
|
|
+ this.$message.error(data.msg)
|
|
|
+ }
|
|
|
+ })
|
|
|
+
|
|
|
this.dataForm = item
|
|
|
+
|
|
|
+ this.dataList = [{disposal:'', isTechnology:''}]
|
|
|
+
|
|
|
+ this.visible = true
|
|
|
},
|
|
|
- // 预览
|
|
|
- previewFile (fileName, url) {
|
|
|
- this.previewVisible = true
|
|
|
+ validateField (type) {
|
|
|
+ this.$refs.dataForm.validateField(type)
|
|
|
+ },
|
|
|
+ attachDetail (attachList) {
|
|
|
this.$nextTick(() => {
|
|
|
- this.$refs.preview.init(fileName, url)
|
|
|
+ this.$refs.attachDetail.init(attachList)
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 表单提交
|
|
|
+ dataFormSubmit () {
|
|
|
+ this.$refs['dataForm'].validate((valid) => {
|
|
|
+ if (valid) {
|
|
|
+ this.$http({
|
|
|
+ url: this.$http.adornUrl(`/biz-service/projProduction/assign`),
|
|
|
+ method: 'post',
|
|
|
+ data: this.$http.adornData({
|
|
|
+ productionManagementId: this.dataForm.productionManagementId,
|
|
|
+ responsibilityPerson: this.dataForm.responsibilityPerson
|
|
|
+ })
|
|
|
+ }).then(({ data }) => {
|
|
|
+ if (data && data.code === '200') {
|
|
|
+ this.$message({
|
|
|
+ message: '操作成功',
|
|
|
+ type: 'success',
|
|
|
+ duration: 1500,
|
|
|
+ onClose: () => {
|
|
|
+ this.onChose()
|
|
|
+ this.$emit('refreshDataList')
|
|
|
+ }
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ this.$message.error(data.msg)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
})
|
|
|
+ },
|
|
|
+ selectChange (val) {
|
|
|
+ this.dataForm.responsibilityPerson = val
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
</script>
|
|
|
|
|
|
<style scoped>
|
|
|
-.my-line {
|
|
|
- border-bottom: 1px solid #c0c4cc;
|
|
|
- margin-bottom: 10px;
|
|
|
+.my-row {
|
|
|
+ margin-bottom: 20px;
|
|
|
}
|
|
|
-.title {
|
|
|
- padding: 10px 0;
|
|
|
+
|
|
|
+.radio-group-wrap {
|
|
|
+ display: flex;
|
|
|
+ align-items: flex-start;
|
|
|
+ flex-direction: column;
|
|
|
+ gap: 10px 15px; /* 行列间距控制 */
|
|
|
+}
|
|
|
+
|
|
|
+.radio-group-wrap :deep(.el-radio) {
|
|
|
+ margin-left: 0; /* 清除横向间距 */
|
|
|
}
|
|
|
</style>
|