王震
2024-01-11 8527b19d2b64db40db7b152ac9dcb207784a1b64
	modified:   src/api/plan/manufacturingorder.js
new file: src/views/common/processinspect-part.vue
modified: src/views/plan/manufacturingorder/productorder-form.vue
modified: src/views/quality/processInspect/processInspect-form.vue
modified: src/views/technology/routing/routing-form.vue
modified: vue.config.js
已修改5个文件
已添加1个文件
418 ■■■■■ 文件已修改
src/api/plan/manufacturingorder.js 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/common/processinspect-part.vue 258 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/plan/manufacturingorder/productorder-form.vue 116 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/quality/processInspect/processInspect-form.vue 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/technology/routing/routing-form.vue 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
vue.config.js 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/plan/manufacturingorder.js
@@ -24,6 +24,15 @@
    data: obj
  })
}
export function changeOrder(obj) {
  return request({
    url: '/mes/plan/manufacturingOrder/changeOrder',
    method: 'post',
    data: obj
  })
}
export function refreshIfsOrderNo(obj) {
  return request({
    url: '/mes/plan/manufacturingOrder/refreshIfsOrderNo',
src/views/common/processinspect-part.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,258 @@
<template>
    <div class="body">
      <el-dialog
        v-diadrag
        width="60%"
        title="报检信息"
        top="5vh"
        :visible.sync="innerVisible"
        append-to-body
        @close="$emit('update:currshowlist', false)"
        :show="currshowlist"
        class="part-dialog"
        id="rawMaterial-part-dialog"
      >
        <ttable
          :table="table"
          @handleSelectionChange="handleSelectionChange"
          @currentChange="handleCurrentChange"
          :uploadInfo="uploadInfo"
          :prelang="prelang"
          :options="options"
          :bottomOffset="150"
          :ajaxFun="ajaxFun"
          :paramObj="paramObj"
          :isShowPagination="false"
          ref="rawPartTable"
        >
          <template #toolbar></template>
        </ttable>
        <div slot="footer" class="dialog-footer">
          <el-button @click="innerVisible = false">取 æ¶ˆ</el-button>
          <el-button type="primary" @click="saveSelectRow">ç¡® å®š</el-button>
        </div>
      </el-dialog>
    </div>
    </template>
    <script>
    import ttable from '@/views/common/ztt-table'
    import { chooseIFS } from '@/api/quality/rawMaterial'
    export default {
      props: {
        currshowlist: {
          type: Boolean,
          default: false
        },
        paramObj: {
          type: Object,
          default: () => {
            return {}
          }
        },
        multiSelect: {
          type: Boolean,
          default: false
        },
        parentSelectedObj: {
          type: Object,
          default: null
        },
        parentSelectedIndex: {
          type: Number,
          default: null
        }
      },
      data() {
        return {
          ajaxFun: chooseIFS,
          innerVisible: false,
          currentRow: null,
          multipleSelection: [],
          uploadInfo: {
            // æ˜¯å¦å±•示上传EXCEL以及对应的url
            isShow: false,
            url: ''
          },
          prelang: 'operation',
          options: {
            height: 300, // é»˜è®¤é«˜åº¦-为了表头固定
            stripe: true, // æ˜¯å¦ä¸ºæ–‘马纹 table
            highlightCurrentRow: false, // æ˜¯å¦è¦é«˜äº®å½“前行
            border: true, // æ˜¯å¦æœ‰çºµå‘边框
            lazy: false, // æ˜¯å¦éœ€è¦æ‡’加载
            fit: true, // åˆ—的宽度是否自撑开
            multiSelect: false, //
            seqNo: true,
            isGeneralSearch: false,
            isRefresh: false, // æ˜¯å¦æ˜¾ç¤ºåˆ·æ–°æŒ‰é’®
            isShowHide: false, // æ˜¯å¦æ˜¾ç¤ºæ˜¾å½±æŒ‰é’®
            isSearch: false, // é«˜çº§æŸ¥è¯¢æŒ‰é’®
            defaultOrderBy: { column: 'formTime', direction: 'desc' }
          },
          table: {
            total: 0,
            currentPage: 1,
            pageSize: 20,
            data: [],
            // æ ‡é¢˜
            column: [
              {
                minWidth: '100',
                prop: 'message',
                label: 'message',
                isTrue: false,
              },
              {
                minWidth: '100',
                prop: 'code',
                label: '零件号',
                sort: true,
                isTrue: true,
                isSearch: true,
                searchInfoType: 'text'
              },
              {
                minWidth: '120',
                prop: 'projectName',
                label: '项目名称',
                isTrue: true,
                isSearch: true,
                searchInfoType: 'text'
             },
              {
                minWidth: '100',
                prop: 'name',
                label: '原材料名称',
                sort: true,
                isTrue: true,
                isSearch: true,
                searchInfoType: 'text'
              },
              {
                minWidth: '100',
                prop: 'formTime',
                label: '来料日期',
                sort: true,
                isTrue: true,
                isSearch: true,
                searchInfoType: 'text'
              },
              {
                minWidth: '100',
                prop: 'specs',
                label: '规格型号',
                sort: true,
                isTrue: true,
                isSearch: true,
                searchInfoType: 'text'
              },
              {
                minWidth: '100',
                prop: 'unit',
                label: '单位',
                sort: true,
                isTrue: true,
                isSearch: true,
                searchInfoType: 'text'
              },
              {
                minWidth: '100',
                prop: 'supplier',
                label: '供应商',
                sort: true,
                isTrue: true,
                isSearch: true,
                searchInfoType: 'text'
              },
              {
                minWidth: '100',
                prop: 'number',
                label: '数量',
                sort: true,
                isTrue: true,
                isSearch: true,
                searchInfoType: 'text'
              },
            ],
          },
        }
      },
      components: {
        ttable
      },
      created(){
      },
      mounted() {
        console.log(this.currshowlist,"开");
      },
      // props:['currentRow'],
      methods: {
        getData() {
          if (this.$refs.rawPartTable !== undefined) {
            this.$refs.rawPartTable.getDataList()
          }
        },
        saveSelectRow() {
          if (this.multiSelect) {
            this.$emit('handleSelectionChange', this.multipleSelection)
          } else {
            this.$emit(
              'listenToPartEvent',
              this.currentRow,
              this.parentSelectedObj,
              this.parentSelectedIndex
            )
          }
          this.innerVisible = false
          this.$parent.costPlannedAmountChange(this.currentRow)
        },
        handleCurrentChange(row) {
          this.currentRow = row
        },
        handleSelectionChange(val) {
          // å¤šè¡Œé€‰ä¸­
          this.multipleSelection = val
        },
      },
      watch: {
        currshowlist() {
            console.log(this.currshowlist,"开?");
          this.innerVisible = this.currshowlist
          if (this.currshowlist) {
            this.$nextTick(() => {
              // this.table.data=[]
              this.getData()
            })
          }
        }
      },
    }
    </script>
    <style>
    .part-dialog .el-dialog__header {
      padding: 10px 20px 10px;
    }
    .part-dialog .el-dialog__header .el-dialog__headerbtn {
      top: 10px;
    }
    .part-dialog .el-dialog__body {
      padding: 5px 20px;
    }
    .part-dialog .el-dialog__footer {
      padding: 5px 20px 10px;
    }
    .part-dialog .el-dialog__body .avue-crud__pagination {
      margin-top: 0px;
      margin-bottom: 5px;
    }
    /* @media screen and (max-width: 800px) {
      .el-dialog {
        height: 600px !important;
      }
    } */
    </style>
src/views/plan/manufacturingorder/productorder-form.vue
@@ -257,11 +257,22 @@
                        </el-form-item>
                      </el-col>
                    </el-row>
                    <el-row>
                      <el-col :span="24" class="productorder-operates-col">
                        <el-card class="productorder-operates">
                          <el-table
                          <el-row>
                            <el-col :span="2" class="frame1">序号
                            </el-col>
                            <el-col :span="4" class="frame1">工序号
                            </el-col>
                            <el-col :span="5" class="frame1">工序描述
                            </el-col>
                            <el-col :span="9" class="frame1">零件
                            </el-col>
                            <el-col :span="3" class="frame1">操作
                            </el-col>
                          </el-row>
                          <!-- <el-table
                            ref="operationTable"
                            :data="operations"
                            style="width: 100%;"
@@ -309,10 +320,56 @@
                                </el-button>
                              </template>
                            </el-table-column>
                          </el-table>
                          </el-table> -->
                          <zttdraggable
                            :forceFallback="true"
                            :list="operations"
                            :animation="200"
                            fallbackClass="fallbackStyle"
                            ghostClass="item_ghost"
                            @end="dragEnd"
                          >
                            <div
                              :class="{ dragItem: true, active: x.active }"
                              v-for="(x, i) in operations"
                              :key="i"
                            >
                              <!-- <div class="dragBody">
                                <div class="info">{{ x.operationNo }}</div>
                                <div class="info">{{ x.operationName }}</div>
                                <div class="info">{{ x.partName }}</div>
                              </div> -->
                              <el-row>
                                <el-col :span="2" class="frame">{{ i+1 }}
                                </el-col>
                                <el-col :span="4" class="frame">{{ x.operationNo  }}
                                </el-col>
                                <el-col :span="5" class="frame">{{ x.operationName }}
                                </el-col>
                                <el-col :span="9" class="frame">{{ x.partName }}
                                </el-col>
                                <el-col :span="3" class="frame">
                                    <el-button
                                      type="text"
                                      size="mini"
                                      @click="openOrderOperation(x)"
                                      >编辑
                                    </el-button>
                                </el-col>
                              </el-row>
                            </div>
                          </zttdraggable>
                        </el-card>
                      </el-col>
                    </el-row>
                  </el-col>
                  <el-col :span="16">
                    <el-tabs type="card" ref="paramTabs">
@@ -918,7 +975,27 @@
    />
  </div>
</template>
<style>
<style lang="scss">
.frame{
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100px;
    // border-width: 1px;
    // border-color: rgb(129, 129, 129);
    // border-style: solid;
    font-size: 15px;
}
.frame1{
  display: flex;
    justify-content: center;
    align-items: center;
    height: 50px;
    // border-width: 1px;
    // border-color: rgb(129, 129, 129);
    // border-style: solid;
    font-size: 15px;
}
.productorder-basic {
  background-color: #fff;
  height: 150px;
@@ -957,6 +1034,7 @@
.productorder-operates {
  height: 605px;
  border: 1px solid #ddd;
  overflow: auto;
}
.productorder-params-template {
@@ -1008,7 +1086,8 @@
  addRoutingTemplateParamLedForOrder,
  updateMoBom,
  delMoBom,
  bomSelectChange
  bomSelectChange,
  changeOrder,
} from '@/api/plan/manufacturingorder'
import { qryMoSamplingRule, delMoSamplingRule } from '@/api/plan/mosamplingrule'
import {
@@ -1038,7 +1117,7 @@
import spotCheckRule from './orderSpotCheckRule'
import spotCheckRuleEdit from './orderSpotCheckRuleEdit'
import { mapGetters } from 'vuex'
import zttdraggable from 'vuedraggable'
export default {
  components: {
    CustomerOrder,
@@ -1054,7 +1133,8 @@
    operationDialog,
    insertOperationDialog,
    spotCheckRule,
    spotCheckRuleEdit
    spotCheckRuleEdit,
    zttdraggable
  },
  data() {
@@ -1319,6 +1399,28 @@
    }
  },
  methods: {
    dragEnd(e){
      this.operations.forEach((e, i) => {
        e.index = i + 1
        e.operationOrder = i+1
      })
      console.log(this.operations,"拖拽结束kk");
      this.dragEndstart()
    },
    dragEndstart(){
        let data = this.operations.map(el =>{
            return {
              id:el.id,
              operationOrder:el.operationOrder,
            }
        })
      console.log(data,"id");
        changeOrder(data).then((res) =>{
            console.log(res,"回调");
        }).catch(error => {
                    console.error(error)
                });
    },
    getSysParam(paramKey) {
      getSysParam(paramKey).then((response) => {
        var paramVal = response.data.data
src/views/quality/processInspect/processInspect-form.vue
@@ -27,6 +27,11 @@
                                <el-form-item label="车间订单号" prop="moNo">
                                    <el-input @blur="selectInfoByOrderId" :disabled="processInspectVo.id != null"
                                        v-model="processInspectVo.moNo" placeholder="请输入车间订单号" autocomplete="off" >
                                        <!-- <el-button
                                            slot="append"
                                            icon="el-icon-search"
                                            :disabled="resultVal!=null"
                                            @click="queryCode"></el-button> -->
                                        <el-button
                                            slot="append"
                                            icon="el-icon-full-screen"
@@ -251,6 +256,7 @@
            <el-button type="primary" @click="deviceCode = false">ç¡® å®š</el-button>
        </span>
        </el-dialog>
    <processPart :paramObj="paramObj" :currshowlist.sync="workshop" />
    </div>
</template>
@@ -263,15 +269,17 @@
    updateProcessInsProduct,
    updateProcessInspectsById,
} from '@/api/quality/processInspect'
import processPart from '@/views/common/processinspect-part'
import { selectDevice } from '@/api/quality/processInspect'
import qrCodeApp from '@/views/common/qrCodeApp'
import { validatePositiveInteger } from '@/util/validate'
export default {
    components:{
        qrCodeApp
        qrCodeApp,processPart
    },
    data() {
        return {
            paramObj:{},
            qrcode: false,
            row: null,
            proIndex: 0,
@@ -291,6 +299,7 @@
            resultVal: null,
            technologyList: [],
            deviceList: [],
            workshop:false,//车间弹窗
            hasChildren: true,
            optionsSamplename: [],
            // æ·»åŠ åˆ—
@@ -335,6 +344,14 @@
        this.init()
    },
    methods: {
      queryCode(){
        console.log("llll");
        this.workshop = true
        console.log(this.workshop);
        // this.paramObj = {
        //   code: this.dataForm.code
        // }
      },
      cancelCodeDialog(){
        this.qrcode = false
      },
src/views/technology/routing/routing-form.vue
@@ -136,16 +136,8 @@
              '--dragitemwidth': '250px'
            }"
          >
            <div
              :style="{
                width: 265 * dataForm.operations.length - 15 + 'px'
              }"
            >
              <div
                class="dragHead"
                v-for="x in dataForm.operations.length"
                :key="x"
              >
            <div :style="{ width: 265 * dataForm.operations.length - 15 + 'px' }">
              <div class="dragHead" v-for="x in dataForm.operations.length"  :key="x" >
                <div class="idx">{{ x }}</div>
              </div>
              <zttdraggable
vue.config.js
@@ -4,10 +4,10 @@
 */
// const url = 'http://192.168.2.7:9999'
const url = 'http://192.168.2.7:9999'
//const url = 'https://ztms-mes.chinaztt.cn/'
 const url = 'http://localhost:9999'
//  const url = 'http://localhost:9999'
const localUrl = 'http://localhost:8089'