123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297 |
- <template>
- <div>
- <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>
- <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="unit"
- 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="productSpec"
- 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="projectName"
- 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="projectName"
- header-align="center"
- align="center"
- min-width="140"
- :show-tooltip-when-overflow="true"
- label="关重性">
- </el-table-column>
- <el-table-column
- fixed="right"
- prop="isTechnology"
- header-align="center"
- align="center"
- min-width="140"
- :show-tooltip-when-overflow="true"
- label="是否编制工艺">
- <template slot-scope="scope">
- {{scope.row.isTechnology == 2 ? '否' : '是' }}
- </template>
- </el-table-column>
- <el-table-column
- fixed="right"
- prop="techId"
- header-align="center"
- align="center"
- min-width="140"
- :show-tooltip-when-overflow="true"
- label="是否有工艺">
- <template slot-scope="scope">
- {{scope.row.techId == null || scope.row.techId == 0 ? '否' : '是' }}
- </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-column
- v-if="!disabled"
- fixed="right"
- prop="disposal"
- header-align="center"
- align="center"
- width="120"
- :show-tooltip-when-overflow="true"
- label="操作">
- <template slot-scope="scope">
- <el-button type="text" v-if="scope.row.techId == null || scope.row.techId == 0" @click="handleCrafts(0)">新建工艺</el-button>
- <el-button type="text" v-else @click="handleCrafts(scope.row.techId)">修改工艺</el-button>
- </template>
- </el-table-column>
- </el-table>
- </el-form>
- <span slot="footer" class="dialog-footer">
- <el-button @click="onChose">取消</el-button>
- </span>
- <attach-detail-dialog ref="attachDetail"/>
- </div>
- </template>
- <script>
- import AttachDetailDialog from '../common/attach-detail-dialog'
- export default {
- name: 'plan-submit',
- components: { AttachDetailDialog },
- computed: {},
- data () {
- return {
- disabled: false,
- id: 0,
- dataForm: {
- proProductList: []
- },
- dataRule: {
- planCnt: [{required: true, message: '请输入', trigger: 'blur'}],
- disposal: [{required: true, message: '请选择', trigger: 'change'}],
- isTechnology: [{required: true, message: '请选择', trigger: 'change'}]
- },
- dataList: [],
- dataListLoading: false,
- craftsAddOrDetailVisible: false
- }
- },
- created () {},
- beforeDestroy () {},
- methods: {
- onChose () {
- this.$emit('onChose')
- },
- async init (item, readonly) {
- let id = item.technologyId
- if (readonly) {
- this.disabled = true
- }
- this.$http({
- url: this.$http.adornUrl(`/biz-service/projTechnology/info/${id}`),
- method: 'get'
- }).then(({data}) => {
- if (data && data.code === '200') {
- this.dataForm = data.data
- } else {
- this.$message.error(data.msg)
- }
- })
- },
- validateField (type) {
- this.$refs.dataForm.validateField(type)
- },
- attachDetail (attachList) {
- this.$nextTick(() => {
- this.$refs.attachDetail.init(attachList)
- })
- },
- // 表单提交
- dataFormSubmit () {
- this.$refs['dataForm'].validate((valid) => {
- if (valid) {
- let data = {
- orderCode: this.dataForm.orderCode,
- proProductList: this.dataForm.proProductList
- }
- console.log('data', data)
- this.$http({
- url: this.$http.adornUrl(`/biz-service/projProduction/submitPlan`),
- method: 'post',
- data: this.$http.adornData(data)
- }).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)
- }
- })
- }
- })
- },
- handleCrafts (techId) {
- this.$emit('showCraftsAddOrDetail', techId)
- }
- }
- }
- </script>
- <style>
- .my-row {
- margin-bottom: 20px;
- }
- .radio-group-wrap {
- display: flex;
- align-items: flex-start;
- flex-direction: column;
- gap: 10px 0px; /* 行列间距控制 */
- }
- </style>
|