86134
2023-11-18 b99cd0f6b3ad780eb6fc93170135df30147f503b
Merge remote-tracking branch 'origin/master'
已修改4个文件
74 ■■■■ 文件已修改
src/api/product/personboard.js 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/product/workbench/batchproductout-form-new.vue 46 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/quality/finishedProductInspection/finishedProducter-print.vue 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/quality/finishedProductInspection/index.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/product/personboard.js
@@ -260,6 +260,14 @@
  })
}
export function submitProductMain(obj) {
  return request({
    url: '/mes/product/submitProductMain',
    method: 'post',
    data: obj
  })
}
export function batchSaveProductOutput(obj) {
  return request({
    url: '/mes/product/batchSaveProductOutput',
src/views/product/workbench/batchproductout-form-new.vue
@@ -12,7 +12,7 @@
    title="汇报产出"
    :visible.sync="innerVisible"
    append-to-body
    @close="$emit('update:currshowlist', false)"
    @close="handleClose"
    :show="currshowlist"
    :close-on-click-modal="false"
    class="batch-product-out-form"
@@ -359,6 +359,7 @@
  data() {
    return {
      innerVisible: false,
      staffNameList: [],
      personSelection: [],
      saveDisabled: false,
      currDutyInitproducts: [], // 用于缓存页面中原有的staff产出记录,并且是属于当前班次下的,用于勾选人员时作为原数据参照
@@ -374,6 +375,35 @@
    }
  },
  methods: {
    initProductList(){
      let val = this.personSelection
      //按人员报工
      if(this.groupStatus){
        this.products = []
        this.addProductOutForPerson()
      }else{
        //按组报工
        let nameList = []
        val.forEach(obj=>{
          nameList.push(obj.staffName)
        })
        let staffName = Array.from(new Set(nameList)).join(",")
        if(staffName!=''){
          this.products = this.productList
          this.products.forEach(item=>{
            item.staffName = staffName
          })
        }else{
          this.products = []
        }
      }
    },
    handleClose(){
      this.$emit('update:currshowlist', false)
      this.$nextTick(()=>{
        this.$refs.productOutPersonList.clearSelection()
      })
    },
    isNumber(value) {
      var reg = /^[0-9]+(.[0-9]{1,4})?$/
      if (
@@ -419,6 +449,9 @@
      // 再去与products(此为页面的实时数据,用户有改动即更新)对比,将其中存在的相同人员的生产数量和生产批次同步过来,若products中生产数量或生产批次不存在值,则不进行同步,沿用原来的。
      // 最后,将组装好的选中人员信息,更新到products(按照班次进行),注意更新之后选中人员信息在products位置顺序
      this.personSelection = val
      if(this.currshowlist){
        this.initProductList()
      }
    },
    // 根据选中的人员,生成人员产出信息,并且放在右边列表的最前面
    addProductOutForPerson() {
@@ -502,20 +535,21 @@
        saveProductOuts2() {
            this.clickDateArr.push(new Date().getTime())
            var productOutputList = []
            this.productList.forEach(a=>{
            this.products.forEach(a=>{
                productOutputList.push({
                    partId: a.partId,
                    productQty: a.outNum,
                    outBatchNo: a.outBatchNo,
                    scrapQty: a.scrapQty,
                    remark: a.remark,
          wdr: a.wdr,
                  wdr: a.wdr,
                    staffNo: a.staffNo,
                    staffName: a.staffName,
                    status: a.status,
                    dutyRecordId: a.dutyRecordId,
                    productStaffIds: a.productStaffIds,
                    productStaffs: a.productStaffs
                    productStaffs: a.productStaffs,
                    sortNo: a.sortNo
                })
            })
            var productMains = {
@@ -1055,14 +1089,14 @@
            this.products.push(this.productList[i])
          }
          this.$nextTick(() => {
            this.$refs.productOutPersonList.clearSelection()
            this.$refs.productOutPersonList.toggleAllSelection()
          })
        } else {
          for (let i = 0; i < this.productList.length; i++) {
            this.products.push(this.productList[i])
          }
          this.$nextTick(() => {
            this.$refs.productOutPersonList.clearSelection()
            this.$refs.productOutPersonList.toggleAllSelection()
          })
        }
      }
src/views/quality/finishedProductInspection/finishedProducter-print.vue
@@ -149,6 +149,7 @@
            </table>
            
        </div>
        <div v-for="pel in prjdata">
        <template>
            <div style="page-break-after: always;">
            <div >
@@ -176,7 +177,7 @@
                    <div>
                    <div class="bodycs-2">
                        <p ><span class=x1111112  style='margin-left: 40px;'>检验项目:<br>&nbsp;Test Item</span></p> 
                        <p v-for="pel in prjdata"><span class="ziti">{{pel.father}}</span><br><span style="display: block;height: 2px; width: 500px; background: rgb(20, 20, 22);margin-left: 80px;"></span></span></p>
                        <p ><span class="ziti">{{pel.father}}</span><br><span style="display: block;height: 2px; width: 500px; background: rgb(20, 20, 22);margin-left: 80px;"></span></span></p>
                    </div>
                    <div class="bodycs-3">
                        <p ><span class=x1111112 style='margin-left: 36px;'>样品名称:<br>Description</span></p> 
@@ -188,20 +189,20 @@
                    </div>
                    <div class="bodycs-3">
                        <p ><span class=x1111112 style='margin-left: 36px;'>样品数量:<br>Quantity</span></p> 
                        <p v-for="pel in prjdata"><span class="ziti">{{quantity}}</span><br><span style="display: block;height: 2px; width: 500px; background: rgb(20, 20, 22);margin-left: 75px;"></span></span></p>
                        <p ><span class="ziti">{{quantity}}</span><br><span style="display: block;height: 2px; width: 500px; background: rgb(20, 20, 22);margin-left: 75px;"></span></span></p>
                    </div>
                    <div class="bodycs-3">
                        <p ><span class=x1111112 style='margin-left: 36px;'>检验类别:<br>Type of Test</span></p> 
                        <p v-for="pel in prjdata"><span class="ziti">产品检验</span><br><span style="display: block;height: 2px; width: 500px; background: rgb(20, 20, 22);margin-left: 75px;"></span></span></p>
                        <p ><span class="ziti">产品检验</span><br><span style="display: block;height: 2px; width: 500px; background: rgb(20, 20, 22);margin-left: 75px;"></span></span></p>
                    </div>
                    <div>
                        <div class="chilen">
                        <p ><span class="x1111113">批  准:<br>&nbsp;&nbsp;Approved by</span></p> 
                        <p v-for="pel in prjdata"><span class="time"></span><br><span style="display: block;height: 2px; width: 300px; background: rgb(20, 20, 22);margin-left: 75px;"></span></span></p>
                        <p ><span class="time"></span><br><span style="display: block;height: 2px; width: 300px; background: rgb(20, 20, 22);margin-left: 75px;"></span></span></p>
                        </div>
                        <div class="chilen">
                        <p ><span class="x1111113">核验员:<br>&nbsp;&nbsp;Inspected by</span></p> 
                        <p v-for="pel in prjdata"><span class="time"></span><br><span style="display: block;height: 2px; width: 300px; background: rgb(20, 20, 22);margin-left: 75px;"></span></span></p>
                        <p ><span class="time"></span><br><span style="display: block;height: 2px; width: 300px; background: rgb(20, 20, 22);margin-left: 75px;"></span></span></p>
                        </div>
                        <div style="display: flex;margin-left: 280px;">
                        <p ><span class="x1111113">检验员:<br>&nbsp;Tested by</span></p> 
@@ -209,11 +210,11 @@
                        </div>
                        <div class="cldata">
                        <p ><span class="x1111113">送样日期:<br>Delivery Date</span></p> 
                        <p v-for="pel in prjdata"><span class="time">{{tableData.updateTime}}</span><br><span style="display: block;height: 2px; width: 300px; background: rgb(20, 20, 22);margin-left: 75px;"></span></span></p>
                        <p ><span class="time">{{tableData.updateTime}}</span><br><span style="display: block;height: 2px; width: 300px; background: rgb(20, 20, 22);margin-left: 75px;"></span></span></p>
                        </div>
                        <div class="cldata">
                        <p ><span class="x1111113">测试日期:<br>Testing Date</span></p> 
                        <p v-for="pel in prjdata"><span class="time">{{tableData.createTime}}</span><br><span style="display: block;height: 2px; width: 300px; background: rgb(20, 20, 22);margin-left: 75px;"></span></span></p>
                        <p ><span class="time">{{tableData.createTime}}</span><br><span style="display: block;height: 2px; width: 300px; background: rgb(20, 20, 22);margin-left: 75px;"></span></span></p>
                        </div>
                    </div>
                </div>
@@ -486,6 +487,7 @@
            </div>
            </div>
        </template>
        </div>
</div>
</template>
@@ -579,7 +581,7 @@
                            itype: '',
                            testValueList: new Array(this.columnLength)
                        }
                        let rowNum = 30
                        let rowNum = 15
                        let columnNum = this.columnLength
            if(list && list.length<2){
                list.forEach(item=>{
src/views/quality/finishedProductInspection/index.vue
@@ -227,7 +227,7 @@
                PrintJS({
                    printable: "printRaw",
                    type: "html",
                    maxWidth: 880,
                    maxWidth: 1000,
                    printSettings,
                    style: '@page {margin: 2.0mm 2.0mm;size:A4;}',
                    targetStyles: ["*"],