| | |
| | | <template> |
| | | <view> |
| | | <page-nav title="委外收料"></page-nav> |
| | | <page-nav title="外协收料"></page-nav> |
| | | |
| | | |
| | | <view v-show="topContent.length===0"> |
| | | <div class="sacnBody"> |
| | | <div class="scanImg" @click="topScanClick"></div> |
| | | <div class="scanText">扫描任务条码</div> |
| | | </div> |
| | | </view> |
| | | <view class="flex_center" style="margin: 20rpx;"> |
| | | |
| | | <view v-show="topContent.length!==0" class="mainContent"> |
| | | <u-gap height="10" bgColor="#eff0f1"></u-gap> |
| | | <view class="head"> |
| | | <view class="head_block"> |
| | | <view class="head_left"> |
| | | <view class="head_bar"></view> |
| | | <view class="head_title" style="font-weight: bolder;"> |
| | | 收料信息 |
| | | </view> |
| | | </view> |
| | | </view> |
| | | |
| | | <view class="marginLeft20 marginRight20" style="height: 410rpx;" v-if="topContent.length!==0"> |
| | | <view class="marginBottom20" style="display: flex;"> |
| | | <!-- v-for="item in purchorderArr" --> |
| | | <view class="flex_column titleFont"> |
| | | <view>工单编号:</view> |
| | | <view>产品编码:</view> |
| | | <view>产品名称:</view> |
| | | <view>产品规格:</view> |
| | | <view>当前工序:</view> |
| | | <view>任务数量:</view> |
| | | <view>未收/已收:</view> |
| | | <view>下道工序:</view> |
| | | </view> |
| | | <view class="flex_column contentFont"> |
| | | <view>{{topContent[0].wo_code}}</view> |
| | | <view>{{topContent[0].partnumber}}</view> |
| | | <view>{{topContent[0].partname}}</view> |
| | | <view>{{topContent[0].partspec?topContent[0].partspec:'/'}}</view> |
| | | <view>{{topContent[0].stepname}}</view> |
| | | <view>{{topContent[0].planqty}}</view> |
| | | <view>{{topContent[0].startqty+'/'+topContent[0].reportqty}}</view> |
| | | <view>{{topContent[0].nextstepname?topContent[0].nextstepname:'/'}}</view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | |
| | | </view> |
| | | |
| | | |
| | | <u-gap height="10" bgColor="#eff0f1"></u-gap> |
| | | <view class="head"> |
| | | <view class="head_block"> |
| | | <view class="head_left"> |
| | | <view class="head_bar"></view> |
| | | <view class="head_title" style="font-weight: bolder;"> |
| | | 收料操作 |
| | | </view> |
| | | </view> |
| | | </view> |
| | | |
| | | <view class="flex_column"> |
| | | |
| | | <view class="flex_center" style="margin: 0rpx 20rpx 10rpx;line-height: 76rpx;"> |
| | | <view style="display: flex;" class="titleFont"> |
| | | <view style="color: red;margin-right: 6rpx;">*</view> 外协供方 |
| | | </view> |
| | | <view style="margin-left: 20rpx;"> |
| | | <view @click='WXSheetClick' class="custominputClass"> |
| | | <view v-show='WXSheetValue===""' style="color: rgb(192, 196, 204);">请选择</view> |
| | | <view v-show='WXSheetValue!==""' class="ellipsis" style="width: 390rpx;"> |
| | | {{WXSheetValue}} |
| | | </view> |
| | | <u-icon :name="!WXSheetShow?'arrow-down-fill':'arrow-up-fill'"></u-icon> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | |
| | | <view class="flex_center" style="margin: 0rpx 20rpx 10rpx;line-height: 76rpx;"> |
| | | <view style="display: flex;" class="titleFont"> |
| | | <view style="color: red;margin-right: 6rpx;">*</view> 收料人员 |
| | | </view> |
| | | <view style="margin-left: 20rpx;"> |
| | | <view @click='userSheetClick' class="custominputClass"> |
| | | <view v-show='userSheetValue===""' style="color: rgb(192, 196, 204);">请选择</view> |
| | | <view v-show='userSheetValue!==""' class="ellipsis" style="width: 390rpx;"> |
| | | {{userSheetValue}} |
| | | </view> |
| | | <u-icon :name="!userSheetShow?'arrow-down-fill':'arrow-up-fill'"></u-icon> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | |
| | | |
| | | <view class="flex_center titleFont" style="margin: 0rpx 20rpx 10rpx;line-height: 56rpx;"> |
| | | <view style="color: red;margin-right: 6rpx;">*</view> 收料数量 |
| | | <view style="margin-left: 20rpx;"> |
| | | <view class='inputClass'> |
| | | <u--input placeholder="请输入" border="surround" type='number' v-model="sqty"> |
| | | <!-- #ifdef H5 --> |
| | | <u--input prefixIcon="search" prefixIconStyle="font-size: 22px;color: #909399" :placeholder="placeholder" |
| | | style="width:100%;background-color: #fff;border-radius: 40rpx;" border="surround" suffixIcon="scan" |
| | | suffixIconStyle="color: #909399;font-size: 22px;" v-model="inputBoxValue" |
| | | @change="confirmInputBoxValue"> |
| | | <template slot="suffix"> |
| | | <u-icon name="scan" color="#909399" size="24" @click="scanClick"></u-icon> |
| | | </template> |
| | | </u--input> |
| | | </view> |
| | | <!-- #endif --> |
| | | |
| | | <!-- #ifdef APP-PLUS --> |
| | | <u-input prefixIcon="search" prefixIconStyle="font-size: 22px;color: #909399" :placeholder="placeholder" |
| | | style="width:100%;background-color: #fff;border-radius: 40rpx;" border="surround" suffixIcon="scan" |
| | | suffixIconStyle="color: #909399;font-size: 22px;" v-model="inputBoxValue" |
| | | @change="confirmInputBoxValue"> |
| | | <template slot="suffix"> |
| | | <u-icon name="scan" color="#909399" size="24" @click="scanClick"></u-icon> |
| | | </template> |
| | | </u-input> |
| | | <!-- #endif --> |
| | | |
| | | <view class="flex_center marginLeft20" @click="popupShow=true"> |
| | | <u--text size='16' color='#909399' text="筛选"></u--text> |
| | | <u--image :showLoading="true" src="../../static/img/sift.png" width="20px" height="20px"></u--image> |
| | | </view> |
| | | </view> |
| | | |
| | | |
| | | <u-alert :title="alertTitle" type="info"></u-alert> |
| | | |
| | | |
| | | <!-- 折叠面板 --> |
| | | <!-- <u-collapse @change="change" @close="close" @open="open"> --> |
| | | <!-- @change="collapseChange" --> |
| | | <u-collapse style="max-height: 590px;overflow: auto;"> |
| | | <!-- :value='parseFloat(item.ordergoodqty)+"/"+parseFloat(item.orderqty)' --> |
| | | <u-collapse-item style="position: relative;" :title="item.ordercode" :name='item.ordercode' |
| | | :value='parseFloat(item.ordergoodqty)+"/"+parseFloat(item.orderqty)' |
| | | :label="item.children.length===0?'未派发':''" :disabled='item.children.length===0' |
| | | v-for="item in collapseArr" :key="item.ordercode"> |
| | | |
| | | |
| | | <view style="position: absolute;width: 200rpx;left: 30rpx;top:34px;font-size: 24rpx;color: #999;"> |
| | | {{item.partname}} {{item.partspec}} |
| | | </view> |
| | | |
| | | |
| | | |
| | | <u-gap height="10" bgColor="#eff0f1"></u-gap> |
| | | <view class="head" v-if="topContent.length!==0"> |
| | | <view class="head_block"> |
| | | <view class="head_left"> |
| | | <view class="head_bar"></view> |
| | | <view class="head_title" style="font-weight: bolder;"> |
| | | 可收料供应商 |
| | | </view> |
| | | </view> |
| | | <!-- <view style="position: absolute;width: 26%;left: 44%;top:16px;"> --> |
| | | <view style="position: absolute;width: 120px;left: 44%;top:16px;color:#0659ff" |
| | | @click="progressClick(item.ordercode)"> |
| | | <!-- {{item.partname}}{{item.partspec}} --> |
| | | <u-line-progress :percentage="parseFloat((item.ordergoodqty*100/item.orderqty).toFixed(2))" |
| | | inactiveColor="#d1d6f5" height="10" activeColor="#0659ff"></u-line-progress> |
| | | </view> |
| | | |
| | | <view class="flex_column marginLeft20 marginRight20 marginBottom20 titleFont"> |
| | | <view v-for='(i,index) in topContent[0].list' |
| | | v-if="parseFloat(i.fqty) - parseFloat(i.sqty) - parseFloat(i.ng_qty) - parseFloat(i.laborbad_qty)- parseFloat(i.materielbad_qty)>0" |
| | | style="display: flex;"> |
| | | <view>{{index+1}}</view> |
| | | <view class="ellipsis" style="width: 400rpx;margin: 0 30rpx;">{{i.tp}}</view> |
| | | <!-- <view style="position: absolute;width: 100px;right: 33px; top:13px; "> |
| | | <view class="" style="display: flex;justify-content: flex-end;"> |
| | | <view style="color: #0659ff;"> |
| | | {{parseFloat(item.ordergoodqty)}} |
| | | </view> |
| | | <view> |
| | | {{ parseFloat(i.fqty) - parseFloat(i.sqty) - parseFloat(i.ng_qty) - parseFloat(i.laborbad_qty)- parseFloat(i.materielbad_qty)}} |
| | | /{{ parseFloat(item.orderqty)}} |
| | | </view> |
| | | <!-- <view>件</view> --> |
| | | </view> |
| | | |
| | | </view> |
| | | |
| | | </view> |
| | | |
| | | <u-gap height="10" bgColor="#eff0f1"></u-gap> |
| | | --> |
| | | |
| | | |
| | | <view class="head marginLeft10 marginRight10" style="padding-bottom: 20rpx;"> |
| | | <view class="head_block"> |
| | | <view class="head_left"> |
| | | <view class="head_bar"></view> |
| | | <view class="head_title"> |
| | | 不良统计 |
| | | </view> |
| | | </view> |
| | | |
| | | </view> |
| | | <view v-if="radiovalue==='生产工单'" style="margin:0 0 5px"> |
| | | <view class="flex_column "> |
| | | |
| | | |
| | | <u-button type="primary" :plain="true" icon='plus-circle' text="添加" |
| | | style="width: 90%;margin: 20rpx auto;" @click="add"></u-button> |
| | | |
| | | |
| | | <view v-for='(item,index) in ngqtyArr' class="badSheetClass" :key="item.uid"> |
| | | |
| | | <view class="badNumber">{{index+1}}</view> |
| | | <u-icon name="trash" size="20" class="trash" v-if="ngqtyArr.length!==1" |
| | | @click="trashDelete(index)" color="rgb(0, 102, 255)"></u-icon> |
| | | |
| | | <view class="flex_center titleFont" style="margin: 0rpx 20rpx 10rpx;line-height: 56rpx;"> |
| | | <view style="color: #fff;margin-right: 6rpx;">*</view> 不良数量: |
| | | <view class='inputClass'> |
| | | <u--input placeholder="请输入" border="surround" :adjustPosition='false' type='number' |
| | | v-model="item.ngqty"></u--input> |
| | | <view style="display:flex"> |
| | | <view class="titleFont" style="font-size: 14px;">产品编码:</view> |
| | | <view class="contentFont" style="font-size: 14px;">{{item.partcode}}</view> |
| | | </view> |
| | | |
| | | <view style="display:flex"> |
| | | <view class="titleFont" style="font-size: 14px;">产品名称:</view> |
| | | <view class="contentFont" style="font-size: 14px;">{{item.partname}}</view> |
| | | </view> |
| | | <view class="flex_center" style="margin: 0rpx 20rpx 10rpx;line-height: 76rpx;"> |
| | | <view style="display: flex;" class="titleFont"> |
| | | <view style="color: #fff;margin-right: 6rpx;">*</view> 不良原因: |
| | | </view> |
| | | <view @click='badSheetClick(item)' class="custominputClass"> |
| | | <view v-show='item.badSheetValue.length===0' style="color: rgb(192, 196, 204);">请选择 |
| | | </view> |
| | | <view v-show='item.badSheetValue.length!==0' class="ellipsis" |
| | | style="width: 390rpx;"> |
| | | {{item.badSheetValue}} |
| | | </view> |
| | | <u-icon :name="item.arrowDown?'arrow-down-fill':'arrow-up-fill'"></u-icon> |
| | | <view style="display:flex"> |
| | | <view class="titleFont" style="font-size: 14px;">产品规格:</view> |
| | | <view class="contentFont" style="font-size: 14px;">{{item.partspec?item.partspec:'/'}} |
| | | </view> |
| | | </view> |
| | | |
| | | <u-divider></u-divider> |
| | | |
| | | |
| | | </view> |
| | | |
| | | </view> |
| | | </view> |
| | | |
| | | |
| | | <!-- {{item.children}} --> |
| | | <!-- <u--text class="u-collapse-content"> --> |
| | | <u-steps :current="-1" inactiveColor='#0659FF' direction="column"> |
| | | <view v-for="(it,ind) in item.children" :key="item.ordercode+it.name+ind" |
| | | @click="gotoPage(item.ordercode,it.code)" style="display: flex;align-items: center;"> |
| | | |
| | | |
| | | |
| | | <u-steps-item :title="it.code+'/'+it.name+it.spec"></u-steps-item> |
| | | <view class="" style="width: 100px;"> |
| | | <u-line-progress :percentage="parseFloat((it.goodqty*100/it.planqty).toFixed(2))" |
| | | inactiveColor="#d1d6f5" height="10" activeColor="#0659ff"></u-line-progress> |
| | | </view> |
| | | <view style="width: 30%;text-align: right;"> |
| | | <view class="" style="display: flex;justify-content: flex-end;"> |
| | | <view style="color: #0659ff;"> |
| | | {{parseFloat(it.goodqty)}} |
| | | </view> |
| | | <view> |
| | | /{{ parseFloat(it.planqty)}} |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | |
| | | |
| | | <u-picker v-if="topContent.length!==0" :show="WXSheetShow" :columns="WXColumns" :itemHeight='55' |
| | | :closeOnClickOverlay='true' @close='WXSheetShow=false' @confirm='WXPickerConfirm' |
| | | @cancel='WXSheetShow=false'> |
| | | </u-picker> |
| | | </u-steps> |
| | | <!-- </u--text> --> |
| | | |
| | | |
| | | <u-picker v-if="topContent.length!==0" :show="userSheetShow" :columns="userColumns" :itemHeight='55' |
| | | :closeOnClickOverlay='true' @close='userSheetShow=false' @confirm='userPickerConfirm' |
| | | @cancel='userSheetShow=false'> |
| | | </u-picker> |
| | | </u-collapse-item> |
| | | |
| | | </u-collapse> |
| | | |
| | | |
| | | <!-- 不良原因 --> |
| | | <u-action-sheet v-if="topContent.length!==0" :actions="badSelectArr" :safeAreaInsetBottom='true' |
| | | :closeOnClickOverlay="true" :closeOnClickAction="true" @close="badSelectClose" :show="badSheetShow" |
| | | @select='badSheetSelect'> |
| | | <view style="min-height: 100rpx;"> |
| | | <u-checkbox-group @change="checkboxChange" size='20px' v-model="checkBoxValue" iconPlacement="right" |
| | | placement="column"> |
| | | <view v-for="(item,index) in badSelectArr"> |
| | | <u-checkbox activeColor="rgb(0, 102, 255)" labelSize='18' :key="item.code+index" |
| | | :name='item.name' :label="item.name"> |
| | | </u-checkbox> |
| | | </view> |
| | | </u-checkbox-group> |
| | | </view> |
| | | </u-action-sheet> |
| | | <!-- 弹出层 --> |
| | | <!-- closeIconPos='top-left' closeOnClickOverlay closeable='true' --> |
| | | <u-popup :show="popupShow" mode="right" @close="popupClose" @open="popupOpen"> |
| | | <view style="margin: 120px 10px 20px;" class="flex_column"> |
| | | |
| | | |
| | | |
| | | |
| | | <!-- <view style="display: flex;"> |
| | | <view> |
| | | 单据类型: |
| | | </view> |
| | | |
| | | <u-button size="large" v-show="topContent.length!==0" :loading="isDisabledSubmitButton" |
| | | loadingText="正在提交,请稍等..." type="primary" @click="submit" text="收料"> |
| | | </u-button> |
| | | <u-radio-group v-model="radiovalue" placement="column" @change="groupChange" |
| | | style="margin-top: 4px;"> |
| | | <u-radio :customStyle="{marginBottom: '8px'}" v-for="(item, index) in radiolist" |
| | | :key="index+item.name" :label="item.name" iconSize='16' labelSize='16' :name="item.name"> |
| | | |
| | | |
| | | <!-- 悬浮球 --> |
| | | <!-- <view v-show="topContent.length!==0&&!WXSheetShow&&!userSheetShow&&!badSheetShow" @click="topScanClick"> |
| | | <drag-ball :x='$DeviceInformation.screenWidth*0.8' :y="$DeviceInformation.screenHeight*0.7"></drag-ball> |
| | | </u-radio> |
| | | </u-radio-group> |
| | | </view> --> |
| | | |
| | | <view style="margin-top: 20px;display: flex;align-items: center;"> |
| | | |
| | | <view class=""> |
| | | 产品信息: |
| | | </view> |
| | | <view class=""> |
| | | <u-button :hairline="true" shape="circle" icon="map" :plain="true" |
| | | style="width: 100px;height: 26px;" type="primary" text="选择产品" @click="chosePart"></u-button> |
| | | </view> |
| | | |
| | | </view> |
| | | |
| | | <view style="display: flex;flex-wrap: wrap;"> |
| | | <u-tag style="width:220rpx;" :text="item.name" v-for="item in tagArr" :key="item.code" |
| | | :closable="true" :show="item.close" @close="tagClose(item)"></u-tag> |
| | | </view> |
| | | |
| | | |
| | | |
| | | <!-- <view class="head" style="margin-top: 10px;"> |
| | | <view class="head_block" style="height: 80rpx; display: flex;justify-content: space-around;"> |
| | | <u-button :plain='today' style="width: 70px;height: 25px;" @click="dateChange('today')" |
| | | type="primary" shape="circle" text="今日"> |
| | | </u-button> |
| | | <u-button :plain='month' style="width: 70px;height: 25px;" @click="dateChange('month')" |
| | | type="primary" shape="circle" text="本月"> |
| | | </u-button> |
| | | <u-button :plain='custom' style="width: 70px;height: 25px;" @click="dateChange('custom')" |
| | | type="primary" shape="circle" text="自定义"></u-button> |
| | | </view> |
| | | </view> |
| | | |
| | | <view v-if="!custom" class="flex_column" |
| | | style="display: flex;justify-content: space-around;width: 100%;"> |
| | | <view class="" style="display: flex;justify-content: space-evenly;width: 100%;"> |
| | | <view class="titleFont">开始日期</view> |
| | | <view class="titleFont">~</view> |
| | | <view class="titleFont">结束日期</view> |
| | | </view> |
| | | |
| | | <u-button type="info" icon='calendar' iconColor="#0659FF" size="" @click="calendarClick" |
| | | :text="calendarRange"> |
| | | </u-button> |
| | | </view> --> |
| | | |
| | | <!-- <uni-calendar ref="calendar" :range='true' :insert="false" @confirm="calendarConfirm" /> --> |
| | | |
| | | </view> |
| | | </u-popup> |
| | | |
| | | |
| | | <!-- <scan-code></scan-code> --> |
| | | |
| | | |
| | | <!-- 悬浮球 --> |
| | | <view @click="scan2"> |
| | | <drag-ball :x='300' :y="600"></drag-ball> |
| | | </view> |
| | | </view> |
| | | </template> |
| | | |
| | | |
| | | <script> |
| | | import { |
| | | MesOrderStepStart, |
| | | CustomerPermissions, |
| | | PersonPermissions, |
| | | DefectPermissions, |
| | | SavaMesOrderStepIn, |
| | | LabelBarCode |
| | | ProductionScheduleKanban |
| | | } from '../../config/api.js'; |
| | | // import scanCode from '@/components/scan-code/scan-code.vue' |
| | | |
| | | export default { |
| | | onLoad(option) { |
| | | const _this = this |
| | | uni.$off('scancodedate') // 每次进来先 移除全局自定义事件监听器 |
| | | uni.$on('scancodedate', function(content) { |
| | | console.log("扫描到的内容为:", content) |
| | | _this.getCheckScanDeviceQrCodeData(content) |
| | | }) |
| | | |
| | | |
| | | console.log(option, 8) |
| | | }, |
| | | |
| | | onPullDownRefresh() { |
| | |
| | | data() { |
| | | return { |
| | | topRightMessageCount: '', |
| | | |
| | | isDisabledSubmitButton: false, |
| | | |
| | | topContent: [], |
| | | // { |
| | | // "wo_code": "MO-2023-06-0003_1", |
| | | // "partnumber": "308", |
| | | // "partname": "电池包", |
| | | // "partspec": "", |
| | | // "seq": "2", |
| | | // "stepcode": "ZSStep03", |
| | | // "stepname": "去毛刺", |
| | | // "nextstepcode": "ZSStep06", |
| | | // "nextstepname": "包装2", |
| | | // "stepdesc": "", |
| | | // "wkshopcode": "ZS001", |
| | | // "wkshopname": "注塑车间", |
| | | // "planqty": 50.00, |
| | | // "startqty": 29.00, |
| | | // "noreportqty": 29.00, |
| | | // "reportqty": 21.00, |
| | | // "noputqty": 0.0, |
| | | // "list": null |
| | | // }, //扫描任务条码所带出来的内容 |
| | | |
| | | WXSheetValue: '', |
| | | WXSheetShow: false, //上拉列表是否展开 |
| | | WXColumns: [], |
| | | WXSheetList: [], |
| | | |
| | | |
| | | userSheetValue: '', |
| | | userSheetShow: false, |
| | | userColumns: [], |
| | | userSheetList: [], |
| | | |
| | | sqty: null, |
| | | ngqty: null, |
| | | |
| | | |
| | | badSelectArr: [], |
| | | checkBoxValue: '', |
| | | badSheetShow: false, |
| | | badSheetValue: '', |
| | | |
| | | |
| | | ngqtyArr: [{ |
| | | uid: new Date().getTime(), |
| | | ngqty: '', |
| | | badSheetValue: '', |
| | | arrowDown: true //向下箭头 |
| | | inputBoxValue: '', |
| | | alertTitle: '', |
| | | popupShow: false, //弹出层是否显示 |
| | | collapseArr: [ //折叠面板数据 |
| | | ], |
| | | collapseArrAll: [], //所有 |
| | | placeholder: '请输入工单信息', |
| | | radiovalue: '生产工单', //单据类型 |
| | | // SO:销售订单 MO:生产订单 PO:生产工单 |
| | | radiolist: [{ |
| | | name: '销售订单' |
| | | }, |
| | | { |
| | | name: '生产订单' |
| | | }, |
| | | { |
| | | name: '生产工单' |
| | | }, |
| | | ], |
| | | |
| | | today: true, |
| | | month: false, |
| | | custom: true, |
| | | |
| | | // calendarRange: new Date().toISOString().slice(0, 10) + '~' + new Date().toISOString().slice(0, |
| | | // 10), //系统当前日期 |
| | | calendarRange: new Date().getFullYear() + '-' + (new Date().getMonth() + 1).toString().padStart( |
| | | 2, '0') + '-01' + '~' + new Date().toISOString().slice(0, 10), //当月日期 |
| | | |
| | | |
| | | |
| | | tagArr: [ |
| | | // { |
| | | // ngqty: '', |
| | | // badSheetValue: '', |
| | | // arrowDown: true //向下箭头 |
| | | // close: true, |
| | | // name: '电池包', |
| | | // code: '1002' |
| | | // }, { |
| | | // close: true, |
| | | // name: '电脑', |
| | | // code: '1003' |
| | | // }, { |
| | | // close: true, |
| | | // name: '8054光机', |
| | | // code: '1004' |
| | | // }, { |
| | | // close: true, |
| | | // name: 'G71674冲锋枪', |
| | | // code: '1005' |
| | | // }, { |
| | | // close: true, |
| | | // name: '8051光机', |
| | | // code: '1006' |
| | | // }, |
| | | ], //不良数量、不良原因数组 |
| | | |
| | | |
| | | |
| | | notes: null //备注 |
| | | |
| | | |
| | | ], //已选中的产品标签 |
| | | |
| | | |
| | | } |
| | |
| | | mounted() { |
| | | this.init() |
| | | |
| | | |
| | | // this.getMesOrderStepStart('MO-2023-09-0002_1;106') |
| | | |
| | | |
| | | this.handleSelectAllApi() |
| | | this.getProductionScheduleKanban() |
| | | }, |
| | | methods: { |
| | | init() { |
| | | uni.stopPullDownRefresh(); |
| | | }, |
| | | async handleSelectAllApi() { |
| | | await this.getCustomerPermissions() |
| | | await this.getPersonPermissions() |
| | | await this.getDefectPermissions() |
| | | }, |
| | | |
| | | async getPersonPermissions(val) { |
| | | const data = { |
| | | usercode: val |
| | | } |
| | | const res = await PersonPermissions(this.global.formatData(data)) |
| | | this.userSheetList = res.data |
| | | this.userColumns = [res.data.map(i => i.username)] |
| | | }, |
| | | |
| | | async getCustomerPermissions() { |
| | | |
| | | const res = await CustomerPermissions() |
| | | this.WXSheetList = res.data |
| | | this.WXColumns = [res.data.map(i => i.name)] |
| | | }, |
| | | // 获取不良原因 |
| | | async getDefectPermissions() { |
| | | const res = await DefectPermissions() |
| | | if (res.code === '200') { |
| | | this.badSelectArr = res.data |
| | | } |
| | | }, |
| | | |
| | | |
| | | async getMesOrderStepStart(val) { |
| | | const data = { |
| | | OperType: 'WX', |
| | | SelectType: 'IN', |
| | | wocode: val ? val.split(';')[0] : '', |
| | | stepcode: val ? val.split(';')[1] : '' |
| | | gotoPage(p1, p2) { |
| | | let orderstep = null |
| | | if (p1) { |
| | | orderstep = p1 + ';' + p2 |
| | | } else { |
| | | orderstep = '' |
| | | } |
| | | |
| | | const res = await MesOrderStepStart(this.global.formatData(data)) |
| | | console.log(res, 3) |
| | | |
| | | if (res.code === '200') { |
| | | // this.getCustomerPermissions(val) |
| | | // this.getMesOrderSelectUser(val) |
| | | // this.getDefectPermissions(val) |
| | | this.WXSheetValue = '' |
| | | this.userSheetValue = '' |
| | | this.checkBoxValue = '' |
| | | this.badSheetValue = '' |
| | | this.sqty = null |
| | | this.ngqty = null |
| | | this.notes = null |
| | | this.topContent = [] |
| | | this.topContent.push(res.data) |
| | | } |
| | | // console.log(this.topContent,6) |
| | | |
| | | uni.navigateTo({ |
| | | url: './wxsl2?orderstep=' + orderstep |
| | | }) |
| | | }, |
| | | |
| | | // 任务条码 的扫码框点击 |
| | | topScanClick() { |
| | | scan2() { |
| | | let that = this; |
| | | |
| | | uni.scanCode({ |
| | |
| | | success: function(res) { |
| | | console.log('条码类型:' + res.scanType); |
| | | console.log('条码内容:' + res.result); |
| | | // that.scanContent = res.result; |
| | | |
| | | that.getMesOrderStepStart(res.result) |
| | | uni.navigateTo({ |
| | | url: './wxsl2?orderstep=' + res.result |
| | | }) |
| | | |
| | | }, |
| | | complete: function(res) { |
| | |
| | | |
| | | }); |
| | | }, |
| | | badSheetClick(item) { |
| | | if (!item.ngqty) { |
| | | return uni.$u.toast('请先填写不良数量!') |
| | | } |
| | | item.arrowDown = !item.arrowDown |
| | | |
| | | this.checkBoxValue = item.badSheetValue.split(',') |
| | | this.badSheetShow = true |
| | | }, |
| | | |
| | | badSheetSelect(val) { |
| | | console.log('执行了!') |
| | | }, |
| | | checkboxChange(val) { |
| | | this.badSheetValue = val.join(',') |
| | | }, |
| | | |
| | | |
| | | WXSheetClick() { |
| | | this.WXSheetShow = true |
| | | }, |
| | | |
| | | WXPickerConfirm(val) { |
| | | this.WXSheetValue = val.value[0] |
| | | this.WXSheetShow = false |
| | | }, |
| | | |
| | | userSheetClick() { |
| | | this.userSheetShow = true |
| | | }, |
| | | |
| | | userPickerConfirm(val) { |
| | | this.userSheetValue = val.value[0] |
| | | this.userSheetShow = false |
| | | }, |
| | | |
| | | // 添加 |
| | | add() { |
| | | |
| | | // if (this.ngqtyArr.find(i => i.badSheetValue === '')) { |
| | | // return uni.$u.toast('请先完善前面不良选项!') |
| | | // } |
| | | |
| | | this.ngqtyArr.unshift({ |
| | | uid: new Date().getTime(), |
| | | ngqty: '', |
| | | badSheetValue: '', |
| | | arrowDown: true //向下箭头 |
| | | getCheckboxValue(val) { |
| | | this.tagArr = [] |
| | | val.forEach(i => { |
| | | this.tagArr.push({ |
| | | close: true, |
| | | name: i.split('/')[1].trim(), |
| | | code: i.split('/')[0].trim() |
| | | }) |
| | | |
| | | }) |
| | | }, |
| | | |
| | | //删除 |
| | | trashDelete(index) { |
| | | this.ngqtyArr.splice(index, 1) |
| | | }, |
| | | |
| | | badSelectClose() { |
| | | let index = this.ngqtyArr.findIndex(i => !i.arrowDown) |
| | | |
| | | this.ngqtyArr[index].badSheetValue = this.checkBoxValue.join(',') |
| | | this.ngqtyArr[index].arrowDown = true |
| | | |
| | | this.checkBoxValue = [] |
| | | this.badSheetShow = false |
| | | }, |
| | | |
| | | |
| | | async submit() { |
| | | |
| | | if (!this.WXSheetValue) { |
| | | return uni.$u.toast('外协供方不能为空!') |
| | | // 接口获取 |
| | | async getProductionScheduleKanban() { |
| | | let ordertype = '' // SO:销售订单 MO:生产订单 PO:生产工单 |
| | | switch (this.radiovalue) { |
| | | case '生产工单': |
| | | this.alertTitle = '工单数量(共/个)' |
| | | this.placeholder = '请输入工单信息' |
| | | ordertype = 'PO' |
| | | break |
| | | case '生产订单': |
| | | this.alertTitle = '生产订单数量(共/个)' |
| | | this.placeholder = '请输入生产订单信息' |
| | | ordertype = 'MO' |
| | | break |
| | | case '销售订单': |
| | | this.alertTitle = '销售订单数量(共/个)' |
| | | this.placeholder = '请输入销售订单信息' |
| | | ordertype = 'SO' |
| | | break |
| | | } |
| | | |
| | | if (!this.userSheetValue) { |
| | | return uni.$u.toast('收料人员不能为空!') |
| | | } |
| | | |
| | | if (!this.sqty) { |
| | | return uni.$u.toast('收料数量不能为空!') |
| | | } |
| | | |
| | | let t = this.topContent[0].list.find(i => i.tp === this.WXSheetValue) |
| | | |
| | | if (!t) { |
| | | return uni.$u.toast('请选择可收料的供应商!') |
| | | } |
| | | |
| | | if (!this.ngqtyArr[0].ngqty && (parseFloat(this.sqty) > parseFloat(t.fqty) - parseFloat(t.sqty) - |
| | | parseFloat(t |
| | | .ng_qty) - parseFloat(t.laborbad_qty) - parseFloat(t.materielbad_qty))) { |
| | | return uni.$u.toast('收料数量不能大于该供应商的可收收料!') |
| | | } |
| | | |
| | | // 不良原因 |
| | | const defectlist = [] |
| | | //不良数量 |
| | | let ngqtyNumber = 0 |
| | | |
| | | this.ngqtyArr.forEach(i => { |
| | | if (i.badSheetValue.toString().length > 0) { |
| | | let codeArr = [] |
| | | ngqtyNumber += parseFloat(i.ngqty) |
| | | i.badSheetValue.split(',').forEach(j => { |
| | | codeArr.push(this.badSelectArr.find(i => i.name === j).code) |
| | | }) |
| | | defectlist.push({ |
| | | badqty: i.ngqty, |
| | | defect_code: codeArr.join(',') |
| | | }) |
| | | } |
| | | }) |
| | | |
| | | if ((parseFloat(this.sqty) + parseFloat(ngqtyNumber) > parseFloat(t.fqty) - parseFloat(t |
| | | .sqty) - parseFloat(t.ng_qty) - parseFloat(t.laborbad_qty) - parseFloat(t.materielbad_qty))) { |
| | | return uni.$u.toast('收料数量+不良数量不能大于该供应商的可收收料!') |
| | | } |
| | | |
| | | |
| | | const D = { |
| | | rightcode: '0601', |
| | | partcode: this.topContent[0].partnumber, |
| | | qty: parseFloat(this.sqty), |
| | | onelabqty: parseFloat(this.sqty) |
| | | } |
| | | const { |
| | | data: R |
| | | } = await LabelBarCode(D) |
| | | |
| | | |
| | | const data = { |
| | | mesordercode: this.topContent[0].wo_code, // 工单编号 |
| | | partcode: this.topContent[0].partnumber, // 产品编码 |
| | | stepseq: this.topContent[0].seq, // 工序序号 |
| | | stepcode: this.topContent[0].stepcode, // 工序编码 |
| | | wxcode: this.WXSheetList.find(i => i.name === this.WXSheetValue).code, // 外协供应商编码 |
| | | inuser: this.userSheetList.find(i => i.username === this.userSheetValue).usercode, // 发料人员 |
| | | taskqty: this.topContent[0].planqty, // 任务数量 |
| | | sqty: this.sqty, // 收料数量 |
| | | // ngqty: !this.ngqty ? 0 : this.ngqty, |
| | | remarks: this.notes, |
| | | defectlist, |
| | | inbarcode: R[0].labcode, //入库条码 |
| | | } |
| | | |
| | | console.log(JSON.parse(JSON.stringify(data)), 6) |
| | | |
| | | this.isDisabledSubmitButton = true |
| | | const res = await SavaMesOrderStepIn(data) |
| | | |
| | | if (res.code === '200') { |
| | | uni.$u.toast('收料成功!') |
| | | |
| | | this.WXSheetValue = '' |
| | | this.userSheetValue = '' |
| | | this.checkBoxValue = '' |
| | | this.badSheetValue = '' |
| | | this.sqty = null |
| | | this.ngqty = null |
| | | this.notes = null |
| | | this.topContent = [] |
| | | |
| | | this.isDisabledSubmitButton = false |
| | | } |
| | | ordertype, |
| | | partcode: this.tagArr.map(i => i.code).join(','), |
| | | Ratetime: this.calendarRange, |
| | | |
| | | } |
| | | const { |
| | | data: res |
| | | } = await ProductionScheduleKanban(data) |
| | | |
| | | this.collapseArr = res |
| | | this.collapseArrAll = res |
| | | this.alertTitle = this.alertTitle.split('/')[0] + this.collapseArr.length + this.alertTitle.split('/')[ |
| | | 1] |
| | | |
| | | }, |
| | | |
| | | |
| | | //输入框回车确认事件 |
| | | confirmInputBoxValue(val) { |
| | | this.collapseArr = this.collapseArrAll.filter((p) => { |
| | | return p.ordercode.indexOf(val) !== -1 |
| | | }) |
| | | |
| | | |
| | | switch (this.radiovalue) { |
| | | case '生产工单': |
| | | this.alertTitle = '工单数量(共/个)' |
| | | break |
| | | case '生产订单': |
| | | this.alertTitle = '生产订单数量(共/个)' |
| | | break |
| | | case '销售订单': |
| | | this.alertTitle = '销售订单数量(共/个)' |
| | | break |
| | | } |
| | | this.alertTitle = this.alertTitle.split('/')[0] + this.collapseArr.length + this.alertTitle.split('/')[ |
| | | 1] |
| | | |
| | | }, |
| | | |
| | | // 点击扫码 |
| | | scanClick() { |
| | | this.topScanClick() |
| | | }, |
| | | |
| | | // 扫码框点击 |
| | | topScanClick() { |
| | | let that = this; |
| | | |
| | | uni.scanCode({ |
| | | onlyFromCamera: true, |
| | | // scanType: ['barCode', 'qrCode'], |
| | | scanType: ['qrCode'], |
| | | success: function(res) { |
| | | console.log('条码类型:' + res.scanType); |
| | | console.log('条码内容:' + res.result); |
| | | that.scanContent = res.result; |
| | | |
| | | that.getCheckScanDeviceQrCodeData(that.scanContent); |
| | | }, |
| | | complete: function(res) { |
| | | |
| | | }, |
| | | fail: function(res) { |
| | | console.log('条码类型:' + res.scanType); |
| | | console.log('条码内容:' + res.result); |
| | | } |
| | | |
| | | }); |
| | | }, |
| | | |
| | | getCheckScanDeviceQrCodeData(code) { |
| | | this.inputBoxValue = code |
| | | this.confirmInputBoxValue(this.inputBoxValue) |
| | | }, |
| | | |
| | | |
| | | // 弹出层收起 |
| | | popupClose() { |
| | | this.getProductionScheduleKanban() |
| | | this.popupShow = false |
| | | }, |
| | | |
| | | // 弹出层弹出 |
| | | popupOpen() { |
| | | |
| | | }, |
| | | |
| | | // 选择产品 |
| | | chosePart() { |
| | | let arr = [] |
| | | this.tagArr.forEach(i => { |
| | | arr.push(i.code + '/' + i.name) |
| | | }) |
| | | uni.navigateTo({ |
| | | url: '../znfx/chda?param=' + JSON.stringify(arr) |
| | | }); |
| | | }, |
| | | |
| | | // tag标签关闭 |
| | | tagClose(val) { |
| | | this.tagArr.forEach((i, j) => { |
| | | if (i.code === val.code) { |
| | | i.close = false |
| | | this.tagArr.splice(j, 1) |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | // 时间范围切换 |
| | | dateChange(val) { |
| | | if (val === 'today') { |
| | | this.today = false |
| | | this.month = true |
| | | this.custom = true |
| | | this.calendarRange = new Date().toISOString().slice(0, 10) + '~' + new Date().toISOString().slice(0, |
| | | 10) |
| | | } else if (val === 'month') { |
| | | this.today = true |
| | | this.month = false |
| | | this.custom = true |
| | | |
| | | this.calendarRange = new Date().getFullYear() + '-' + (new Date().getMonth() + 1).toString().padStart( |
| | | 2, '0') + '-01' + '~' + new Date().toISOString().slice(0, 10) |
| | | |
| | | } else if (val === 'custom') { |
| | | this.today = true |
| | | this.month = true |
| | | this.custom = false |
| | | this.calendarRange = new Date().getFullYear() + '-' + (new Date().getMonth() + 1).toString().padStart( |
| | | 2, '0') + '-01' + '~' + new Date().toISOString().slice(0, 10) |
| | | } |
| | | }, |
| | | |
| | | // 日历时间点击 |
| | | calendarClick() { |
| | | this.$refs.calendar.open(); |
| | | }, |
| | | |
| | | // 日历确定事件点击 |
| | | calendarConfirm(val) { |
| | | if (val.range.before < val.range.after) { |
| | | this.calendarRange = val.range.before + '~' + val.range.after |
| | | } else { |
| | | this.calendarRange = val.range.after + '~' + val.range.before |
| | | } |
| | | |
| | | if (val.range.before === '') { |
| | | this.calendarRange = new Date().toISOString().slice(0, 10) + '~' + val.range.after |
| | | } |
| | | if (val.range.after === '') { |
| | | this.calendarRange = val.range.before + '~' + new Date().toISOString().slice(0, 10) |
| | | } |
| | | if (val.range.before === '' && val.range.after === '') { |
| | | this.calendarRange = new Date().toISOString().slice(0, 10) + '~' + new Date().toISOString().slice(0, |
| | | 10) |
| | | } |
| | | // this.getData() |
| | | }, |
| | | |
| | | |
| | | // 单选按钮切换 |
| | | groupChange(val) { |
| | | console.log(val) |
| | | }, |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | | } |
| | | </script> |
| | |
| | | display: block; |
| | | } |
| | | |
| | | ::v-deep .u-action-sheet { |
| | | max-height: 600rpx !important; |
| | | overflow: auto !important; |
| | | ::v-deep .u-alert__text--info--light { |
| | | margin-bottom: 0; |
| | | font-size: 32rpx !important; |
| | | padding-left: 10rpx; |
| | | color: #212121 !important; |
| | | font-weight: lighter; |
| | | } |
| | | |
| | | ::v-deep .u-checkbox-label--right { |
| | | padding: 30rpx; |
| | | border-bottom: 1rpx solid #eee; |
| | | ::v-deep .u-alert--info--light { |
| | | background-color: rgba(255, 255, 255, 0.7); |
| | | } |
| | | |
| | | .custominputClass { |
| | | width: 412rpx; |
| | | display: flex; |
| | | justify-content: space-between; |
| | | border: 3rpx #eff0f1 solid; |
| | | border-radius: 10rpx; |
| | | padding: 0 16rpx; |
| | | line-height: 68rpx; |
| | | ::v-deep .u-steps-item__wrapper { |
| | | background-color: #eee; |
| | | } |
| | | |
| | | |
| | | .badSheetClass { |
| | | position: relative; |
| | | ::v-deep .u-steps-item__line--column { |
| | | display: none; |
| | | } |
| | | |
| | | .badNumber { |
| | | position: absolute; |
| | | top: 20rpx; |
| | | left: 20rpx; |
| | | font-size: 26rpx; |
| | | color: rgb(0, 102, 255) |
| | | ::v-deep .u-slide-right-enter-active { |
| | | width: 70%; |
| | | } |
| | | |
| | | .trash { |
| | | position: absolute; |
| | | top: 20rpx; |
| | | right: 30rpx; |
| | | font-size: 26rpx; |
| | | ::v-deep .uicon-calendar { |
| | | font-size: 36rpx !important; |
| | | } |
| | | |
| | | ::v-deep .u-cell__title-text { |
| | | font-size: 28rpx; |
| | | color: #212121; |
| | | } |
| | | |
| | | ::v-deep .u-cell__value { |
| | | font-size: 28rpx; |
| | | // color: transparent; |
| | | color: #212121; |
| | | |
| | | } |
| | | |
| | | ::v-deep .u-cell__label { |
| | | margin-top: 0; |
| | | line-height: 12px; |
| | | } |
| | | |
| | | ::v-deep .uicon-arrow-right { |
| | | font-size: 14px !important; |
| | | color: #212121 !important; |
| | | } |
| | | |
| | | ::v-deep .u-line-progress__text { |
| | | // margin-right: -20px; |
| | | // color: #212121; |
| | | // width: 100px; |
| | | // margin-top: 10px; |
| | | display: none; |
| | | |
| | | } |
| | | |
| | | ::v-deep .u-text__value--content { |
| | | font-size: 12px !important; |
| | | } |
| | | |
| | | ::v-deep .u-tag__close { |
| | | background: #436df5 !important; |
| | | } |
| | | |
| | | ::v-deep .u-cell__body { |
| | | padding-bottom: 40rpx; |
| | | } |
| | | </style> |