zouyu
2023-11-30 e9e0a3541f090f1d95786a4da0330985cf6e7614
Merge branch 'master' of http://114.132.189.42:9002/r/mes-ocea-before
已修改2个文件
已添加3个文件
733 ■■■■ 文件已修改
src/api/quality/Packaging_ledger.js 66 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/quality/Packaging_ledger/index.vue 320 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/quality/Packaging_ledger/pack-from.vue 173 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/quality/Packaging_ledger/pack-fromadd.vue 171 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
vue.config.js 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/quality/Packaging_ledger.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,66 @@
import request from '@/router/axios'
export function pagedata(query) {
  return request({
    url: '/mes/qualityPackageBox/page',
    method: 'get',
    params: query
  })
}
export function dataadd(query) {
    return request({
      url: '/mes/qualityPackageBoxDetail/selProduct',
      method: 'get',
      params: query
    })
}
export function list(query) {
    return request({
      url: '/mes//qualityPackageBoxDetail/list',
      method: 'get',
      params: query
    })
}
export function customerpage(query) {
    return request({
      url: '/mes/customer/page',
      method: 'get',
      params: query
    })
}
export function pagedataadd(obj) {
    return request({
      url: '/mes/qualityPackageBox/add',
      method: 'post',
      data: obj
    })
}
export function saveList(obj) {
    return request({
      url: '/mes/qualityPackageBoxDetail/saveList',
      method: 'post',
      data: obj
    })
}
export function dropById(query) {
    return request({
      url: '/mes/qualityPackageBox/dropById',
      method: 'get',
      params: query
    })
}
export function deledata(query) {
    return request({
      url: '/mes/qualityPackageBoxDetail/dropById',
      method: 'get',
      params: query
    })
}
src/views/quality/Packaging_ledger/index.vue
@@ -4,17 +4,17 @@
        <el-row>
            <el-col :span="11">
            <ttable
        :table="table"
        :isShowHide="true"
        :prelang="prelang"
        :options="options"
        ref="processconfiguration"
        >
            :table="table"
            :isShowHide="true"
            :prelang="prelang"
            :ajaxFun="ajaxFun"
            :options="options"
            @handleSelectionChange="handleCurrentChange"
            ref="processconfiguration"
            >
        <template #toolbar></template>
            </ttable>
            </el-col>
            <el-col :span="13" style="padding-left: 10px">
                <el-card>
                <div slot="header">
@@ -32,31 +32,21 @@
                    </el-button> -->
                    </el-col>
                    <el-col :span="2">
                    <!-- <el-button
                    <el-button
                        style="float: right; padding: 3px 0"
                        type="text"
                        :disabled="isSubmit"
                        v-thinclick="`dataFormTestStandardParam`"
                        v-if="editable"
                        @click="addpreserve"
                        >保存
                    </el-button> -->
                    </el-button>
                    </el-col>
                    <el-col :span="2">
                    <!-- <el-button
                    <el-button
                        style="float: right; padding: 3px 0"
                        type="text"
                        @click="relateOperationParam()"
                        v-if="editable"
                        >添加
                    </el-button> -->
                    </el-button>
                    </el-col>
                </el-row>
                <el-row>
                    <!-- <span style="font-weight:500" v-if="testNo.length > 0"
                    >您当前选择的检测标准编号是:<span style="color:#066EFF">{{
                        testNo
                    }}</span></span
                    > -->
                </el-row>
                </div>
                <el-table
@@ -77,80 +67,31 @@
                align="center"
                width="50"
              />
              <!-- <el-table-column
                label="是否引用工艺参数"
                prop="isReference"
                align="center"
              >
                <template slot-scope="scope">
                  <el-select
                    v-model="scope.row.isReference"
                    placeholder="请选择"
                    style="width: 100%;"
                  >
                    <el-option
                      v-for="(item, index) in referenceOptions"
                      :key="index"
                      :label="item.label"
                      :value="item.value"
                    >
                    </el-option>
                  </el-select>
                </template>
              </el-table-column>
              <el-table-column label="是否抽检" prop="isCheck" align="center">
                <template slot-scope="scope">
                  <el-select
                    v-model="scope.row.isCheck"
                    placeholder="请选择"
                    style="width: 100%;"
                  >
                    <el-option
                      v-for="(item, index) in isCheckOptions"
                      :key="index"
                      :label="item.label"
                      :value="item.value"
                    >
                    </el-option>
                  </el-select>
                </template>
              </el-table-column>
              <el-table-column
                label="线芯"
                prop="wireCore"
                align="center"
                width="60"
              >
                <template slot-scope="scope">
                  <el-input v-model="scope.row.wireCore"></el-input>
                </template>
              </el-table-column> -->
              <el-table-column label="参数编号" prop="code" align="center" />
              <el-table-column
                label="参数项"
                prop="parameterItem"
                label="产品"
                prop="product"
                align="center"
              />
              <el-table-column
                label="要求范围"
                prop="referenceValue"
                label="产品编号"
                prop="productNo"
                align="center"
              >
              </el-table-column>
              <el-table-column
                label="默认值"
                prop="defaultValue"
                label="规格型号"
                prop="specs"
                align="center"
              >
              </el-table-column>
              <el-table-column
                label="参数项类型"
                prop="paramType"
                label="单位"
                prop="unit"
                align="center"
              >
              </el-table-column>
              <el-table-column
                label="参数格式"
                label="数量"
                prop="parameterFormat"
                align="center"
                width="80"
@@ -158,36 +99,53 @@
                <template slot-scope="scope">
                  <el-input v-model="scope.row.parameterFormat"></el-input>
                </template>
              </el-table-column><el-table-column
                label="测试方法"
                prop="purpose"
                align="center"
                width="80"
              >
              </el-table-column>
              <el-table-column
                label="测试目的"
                prop="method"
                align="center"
                width="80"
              >
              </el-table-column>
              <el-table-column label="单位" prop="unit" align="center" />
              <el-table-column
                fixed="right"
                label="操作"
                align="center"
                width="80">
                <template slot-scope="scope">
                  <el-button @click="deleteadd(scope.row)"  size="small">删除</el-button>
                </template>
              </el-table-column>
            </el-table>
                </el-card>
            </el-col>
        </el-row>
        <!-- æ–°å¢ž -->
        <packfrom
        :currshowlist.sync="addOrUpdateVisible"
        >
        </packfrom>
        <packfromadd
        :currshowlist.sync="increase"
        :packageBoxIddata ="packageBoxId"
        @handleSelectionChange = "preserve"
        >
        </packfromadd>
        </basic-container>
    </div>
</template>
<script>
import { pagedata,dropById,list,saveList,deledata} from '@/api/quality/Packaging_ledger'
import ttable from '@/views/common/ztt-table.vue'
import packfrom from './pack-from.vue'
import packfromadd from './pack-fromadd.vue'
export default {
    data(){
        return {
          goid:'',
          testStandardParams: [],
          packageBoxId:{},
            prelang: 'operation',
            dataListLoading: false,
            ajaxFun: pagedata,
            increase:false,
            addOrUpdateVisible:false,
            options: {
                height: 300, // é»˜è®¤é«˜åº¦-为了表头固定
                stripe: true, // æ˜¯å¦ä¸ºæ–‘马纹 table
@@ -195,7 +153,8 @@
                border: true, // æ˜¯å¦æœ‰çºµå‘边框
                lazy: false, // æ˜¯å¦éœ€è¦æ‡’加载
                fit: true, // åˆ—的宽度是否自撑开
                multiSelect: true, //
                multiSelect: false, //
                isEdit:false,
                seqNo: true,
                isShowHide: true, // æ˜¯å¦æ˜¾ç¤ºæ˜¾å½±æŒ‰é’®
                isRefresh: true, // æ˜¯å¦æ˜¾ç¤ºåˆ·æ–°æŒ‰é’®
@@ -209,49 +168,41 @@
                data: [],
                // æ ‡é¢˜
                column: [
                {
                  minWidth: 'code',
                  prop: 'state',
                  label: '状态',
                  sort: true,
                  isTrue: true,
                  isSearch: true,
                  searchInfoType: 'text'
                },
                  {
                    minWidth: '140',
                    prop: 'oo',
                    label: '订单编号',
                    prop: 'packageNo',
                    label: '包装编号',
                    isTrue: true,
                    isSearch: true,
                    searchInfoType: 'text',
                  },{
                    minWidth: '140',
                    prop: 'materhhooial',
                    label: '质量追溯号',
                    prop: 'createUser',
                    label: '创建人',
                    isTrue: true,
                    isSearch: true,
                    searchInfoType: 'text',
                  },{
                    minWidth: '140',
                    prop: 'contractNo',
                    label: '合同号',
                    isTrue: true,
                    isSearch: true,
                    searchInfoType: 'text',
                  },
                  {
                    minWidth: '140',
                    prop: 'mateuurial',
                    label: '产品名称',
                    isTrue: true,
                    isSearch: true,
                    searchInfoType: 'text',
                  },
                  {
                    minWidth: '140',
                    prop: 'materoiial',
                    label: '规格型号',
                    isTrue: true,
                    isSearch: true,
                    searchInfoType: 'text',
                  },
                  {
                    minWidth: '140',
                    prop: 'matperoial',
                    label: '单位',
                    isTrue: true,
                    isSearch: true,
                    searchInfoType: 'text',
                  },
                  {
                    minWidth: '140',
                    prop: 'materpial',
                    label: '数量',
                    prop: 'updateUser',
                    label: '更新人',
                    isTrue: true,
                    isSearch: true,
                    searchInfoType: 'text',
@@ -259,8 +210,18 @@
                  {
                    minWidth: '130',
                    width: '150',
                    prop: 'dealTime',
                    label: '入库时间',
                    prop: 'updateTime',
                    label: '更新日期',
                    sort: true,
                    isTrue: true,
                    isSearch: true,
                    searchInfoType: 'datetimerange',
                },
                {
                    minWidth: '130',
                    width: '150',
                    prop: 'createTime',
                    label: '创建日期',
                    sort: true,
                    isTrue: true,
                    isSearch: true,
@@ -268,20 +229,107 @@
                },
                ],
                toolbar: [
                  {
                    text: 'xxx',
                    type: 'primary',
                  },
                    {
                      text: '新增',
                      type: 'primary',
                      fun: this.addOrUpdateHandle
                    },
                ],
                operator: [
                    {
                      text: '删除',
                      icon: 'el-icon-delete',
                      type: 'text',
                      size: 'small',
                      fun: this.deleteHandle
                    },{
                      text: 'xx',
                      icon: 'el-icon-delete',
                      type: 'text',
                      size: 'small',
                      // fun: this.deleteHandle
                    }
                  ],
                  operatorConfig: {
                    fixed: 'right',
                    label: '操作',
                    width: 120,
                    minWidth: 120
                  }
            },
       }
    },
    medthods: {},
//     computed: {
//     ...mapGetters(['permissions'])
//   },
    components: {
    ttable
        ttable,
        packfrom,
        packfromadd
        },
        watch: {
          // renovate() {
          //   if (this.innerVisible = false) {
          //     this.$nextTick(() => {
          //       this.getData()
          //     })
          //   }
          // }
      },
    methods: {
       // èŽ·å–æ•°æ®åˆ—è¡¨
      getData() {
        this.$refs.processconfiguration.refreshData()
      },
      //add
      addOrUpdateHandle(){
        this.addOrUpdateVisible = true
      },
      //删除
      deleteHandle(row){
        dropById({id:row.id}).then((res) =>{
          this.getData()
          this.$message.error('删除成功')
        })
      },
      handleCurrentChange(row){
        console.log(row,"id");
        this.packageBoxId = {
          packageBoxId:row[0].id
        }
        this.goid = row[0].id
        list({packageBoxId:row[0].id}).then((res) =>{
          console.log(res,"nihaoa");
          this.testStandardParams = res.data.data
        })
      },
      //详情添加
      relateOperationParam(){
        this.increase = true
      },
      preserve(datalist){
        console.log(datalist);
        this.testStandardParams = datalist
      },
      addpreserve(){
        console.log(this.testStandardParams,"保存数据");
         this.testStandardParams.forEach(el => {
              el.packageBoxId =this.goid
         });
        console.log(this.testStandardParams,"niaho");
        saveList(this.testStandardParams).then((res) =>{
          console.log(res,"保存的");
          this.$message.success('保存成功')
          this.testStandardParams
        })
      },
      deleteadd(row){
          console.log(row,"");
          deledata({id:row.id}).then((res)=>{
          this.$message.success('删除成功')
          this.testStandardParams
          })
      }
    },
    computed: {
  },
}
</script>
src/views/quality/Packaging_ledger/pack-from.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,173 @@
<template>
    <el-dialog
      width="60%"
      title="参数"
      top="5vh"
      :visible.sync="innerVisible"
      :show="currshowlist"
      @close="$emit('update:currshowlist', false)"
      append-to-body
      class="part-dialog"
    >
      <ttable
        :table="table"
        @handleSelectionChange="handleSelectionChange"
        :prelang="prelang"
        :options="options"
        :ajaxFun="ajaxFun"
        :bottomOffset="350"
        ref="paramTable"
      >
        <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>
  </template>
  <script>
import { customerpage,pagedataadd } from '@/api/quality/Packaging_ledger'
import ttable from '@/views/common/ztt-table.vue'
  export default {
    props:{
        currshowlist: {
            type: Boolean,
            default: false
        },
    },
    data() {
      return {
        datalistid:"",
        ajaxFun: customerpage,
        currentRow: false,
        typeOptions: [],
        innerVisible: false,
        listLoading: true,
        multipleSelection: [],
        isShowQuery: false,
        uploadInfo: {
          // æ˜¯å¦å±•示上传EXCEL以及对应的url
          isShow: false,
          url: ''
        },
        prelang: 'operation',
        options: {
          height: 300, // é»˜è®¤é«˜åº¦-为了表头固定
          stripe: true, // æ˜¯å¦ä¸ºæ–‘马纹 table
          highlightCurrentRow: false, // æ˜¯å¦è¦é«˜äº®å½“前行
          border: true, // æ˜¯å¦æœ‰çºµå‘边框
          lazy: false, // æ˜¯å¦éœ€è¦æ‡’加载
          fit: true, // åˆ—的宽度是否自撑开
          multiSelect: false, //
          isEdit:false,
          seqNo: true,
          isShowHide: true, // æ˜¯å¦æ˜¾ç¤ºæ˜¾å½±æŒ‰é’®
          isSearch: true, // é«˜çº§æŸ¥è¯¢æŒ‰é’®
          defaultOrderBy: { column: 'createTime', direction: 'desc' }
        },
        table: {
          total: 0,
          currentPage: 1,
          pageSize: 20,
          data: [],
          // æ ‡é¢˜
          column: [
            {
              minWidth: 'code',
              prop: 'contractNo',
              label: '合同号',
              sort: true,
              isTrue: true,
              isSearch: true,
              searchInfoType: 'text'
            },
            {
              minWidth: '120',
              prop: 'customerName',
              label: '客户名称',
              sort: true,
              isTrue: true,
              isSearch: true,
              searchInfoType: 'text'
            },
            {
              minWidth: '140',
              prop: 'customerNo',
              label: '客户编码',
              sort: true,
              isTrue: true,
              isSearch: true,
              searchInfoType: 'text',
            },
            {
              minWidth: '120',
              prop: 'deliveryDate',
              label: '交货日期',
              sort: true,
              isTrue: true,
              isSearch: true,
              searchInfoType: 'datetimerange'
            },
            {
              minWidth: '120',
              prop: 'entityName',
              label: '工程名称',
              sort: true,
              isTrue: true,
              isSearch: true,
              searchInfoType: 'text'
            },
          ],
        },
        addOrUpdateVisible: false
      }
    },
    components: {
      ttable
    },
    watch: {
      currshowlist() {
        console.log(22211);
        this.innerVisible = this.currshowlist
        if (this.currshowlist) {
          this.$nextTick(() => {
            this.getData()
          })
        }
      }
    },
    computed: {
    //   ...mapGetters(['permissions'])
    },
    created() {
      this.getParamType()
    },
    methods: {
         // èŽ·å–æ•°æ®åˆ—è¡¨
        getData() {
        this.$refs.paramTable.getDataList()
        },
        handleSelectionChange(val){
            let data = val
            data.forEach(el => {
                this.datalistid = el
            });
            console.log(this.datalistid);
        },
      saveSelectRow() {
        pagedataadd ({customerId:this.datalistid.id,contractNo:this.datalistid.contractNo}).then((res =>{
            console.log(res);
            if (res.status === 200) {
                this.$message.success('新增成功')
            }else{
                this.$message.error('创建失败')
            }
        }))
        this.innerVisible = false
          this.$emit('handleSelectionChange',this.innerVisible )
      },
    }
  }
  </script>
src/views/quality/Packaging_ledger/pack-fromadd.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,171 @@
<template>
    <el-dialog
      width="60%"
      title="参数"
      top="5vh"
      :visible.sync="innerVisible"
      :show="currshowlist"
      @close="$emit('update:currshowlist', false)"
      append-to-body
      class="part-dialog"
    >
      <ttable
        :table="table"
        @handleSelectionChange="handleSelectionChange"
        :prelang="prelang"
        :options="options"
        :ajaxFun="ajaxFun"
        :paramObj="packageBoxIddata"
        :bottomOffset="350"
        ref="paramTable"
      >
        <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>
  </template>
  <script>
import { dataadd,saveList } from '@/api/quality/Packaging_ledger'
import ttable from '@/views/common/ztt-table.vue'
  export default {
    props:{
        currshowlist: {
            type: Boolean,
            default: false
        },
        packageBoxIddata:{
            type: Object
        },
    },
    data() {
      return {
        datalist:[],
        datalistid:"",
        ajaxFun: dataadd,
        currentRow: false,
        typeOptions: [],
        innerVisible: false,
        listLoading: true,
        multipleSelection: [],
        isShowQuery: false,
        uploadInfo: {
          // æ˜¯å¦å±•示上传EXCEL以及对应的url
          isShow: false,
          url: ''
        },
        prelang: 'operation',
        options: {
          height: 300, // é»˜è®¤é«˜åº¦-为了表头固定
          stripe: true, // æ˜¯å¦ä¸ºæ–‘马纹 table
          highlightCurrentRow: false, // æ˜¯å¦è¦é«˜äº®å½“前行
          border: true, // æ˜¯å¦æœ‰çºµå‘边框
          lazy: false, // æ˜¯å¦éœ€è¦æ‡’加载
          fit: true, // åˆ—的宽度是否自撑开
          multiSelect: true, //
          seqNo: true,
          isShowHide: true, // æ˜¯å¦æ˜¾ç¤ºæ˜¾å½±æŒ‰é’®
          isSearch: true, // é«˜çº§æŸ¥è¯¢æŒ‰é’®
          defaultOrderBy: { column: 'createTime', direction: 'desc' }
        },
        table: {
          total: 0,
          currentPage: 1,
          pageSize: 20,
          data: [],
          // æ ‡é¢˜
          column: [
            {
              minWidth: 'code',
              prop: 'product',
              label: '产品',
              sort: true,
              isTrue: true,
              isSearch: true,
              searchInfoType: 'text'
            },
            {
              minWidth: '120',
              prop: 'productNo',
              label: '产品编号',
              sort: true,
              isTrue: true,
              isSearch: true,
              searchInfoType: 'text'
            },
            {
              minWidth: '140',
              prop: 'specs',
              label: '规格型号',
              sort: true,
              isTrue: true,
              isSearch: true,
              searchInfoType: 'text',
            },
            {
              minWidth: '120',
              prop: 'unit',
              label: '单位',
              sort: true,
              isTrue: true,
              isSearch: true,
              searchInfoType: 'datetimerange'
            },
          ],
        },
        addOrUpdateVisible: false
      }
    },
    components: {
      ttable
    },
    watch: {
      currshowlist() {
        console.log(22211);
        this.innerVisible = this.currshowlist
      }
    },
    computed: {
    //   ...mapGetters(['permissions'])
    },
    created() {
      this.getParamType()
    },
    methods: {
         // èŽ·å–æ•°æ®åˆ—è¡¨
        getData() {
        this.$refs.paramTable.getDataList()
        },
        handleSelectionChange(val){
            let data = val
            data.forEach(el => {
                this.datalistid = el
            });
        },
      saveSelectRow() {
        console.log(this.packageBoxIddata,"123");
        saveList ({customerId:this.datalistid.id,contractNo:this.datalistid.contractNo}).then((res =>{
            console.log(res);
            if (res.status === 200) {
                this.$message.success('新增成功')
            }else{
                this.$message.error('创建失败')
            }
        }))
        this.innerVisible = false
        //   this.$emit('handleSelectionChange',this.innerVisible )
      },
      handleSelectionChange(val){
        this.datalist = val
        console.log(this.datalist,"数据");
      },
      saveSelectRow(){
        this.$emit('handleSelectionChange',this.datalist )
        this.innerVisible = false
      }
    }
  }
  </script>
vue.config.js
@@ -3,10 +3,11 @@
 * https://cli.vuejs.org/zh/config/
 */
// const url = 'http://192.168.2.7:9999'
const url = 'http://192.168.2.7:9999'
//const url = 'http://192.168.32.45:9999'
// const url = 'http://192.168.0.23:9999'
 const url = 'http://localhost:9999'
//  const url = 'http://localhost:9999'
// const url = 'http://ztt-gateway:9999'
const localUrl = 'http://localhost:8089'