| | |
| | | // uuid: '0000', |
| | | // code: '0000' |
| | | // }) |
| | | // let res = await testLogin({ // 文武 |
| | | // username: '18656077929', |
| | | // password: '123456', |
| | | // companyId: '111', |
| | | // uuid: '0000', |
| | | // code: '0000' |
| | | // }) |
| | | let res = await testLogin({ // 张磊高 |
| | | username: '15256913207', |
| | | let res = await testLogin({ // 文武 |
| | | username: '18656077929', |
| | | password: '123456', |
| | | companyId: '8', |
| | | companyId: '111', |
| | | uuid: '0000', |
| | | code: '0000' |
| | | }) |
| | | // let res = await testLogin({ // 张磊高 |
| | | // username: '15256913207', |
| | | // password: '123456', |
| | | // companyId: '8', |
| | | // uuid: '0000', |
| | | // code: '0000' |
| | | // }) |
| | | |
| | | // let res = await testLogin({ |
| | | // username: '15056231084', |
| | |
| | | module.exports = {
|
| | | // baseUrl: 'http://106.14.20.42/test_hfznzz/',
|
| | | // baseUrl: 'https://hefei.dtkey.cn/test_hfznzz/',
|
| | | // baseUrl: 'http://192.168.0.15:10021',
|
| | | // baseUrl: 'http://192.168.0.18:10021',
|
| | | baseUrl: 'https://dmtest.ahapp.net/doumeeplant_api',
|
| | | phoneRegular: /^1[3456789]\d{9}$/,
|
| | | mailboxRegular: /^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/,
|
| | |
| | | <image @click="openCate()" src="@/static/filter@2x.png" mode="widthFix"> |
| | | </view> |
| | | </view> |
| | | <u-popup :show="open" :round="10" mode="bottom"> |
| | | <u-popup closeOnClickOverlay :show="open" @close="open=false" :round="10" mode="bottom"> |
| | | <scroll-view scroll-y class="content"> |
| | | <slot name="content"></slot> |
| | | </scroll-view> |
| | |
| | | <template>
|
| | | <u-popup :show="show" :round="10" closeable @close="show=false">
|
| | | <view class="material-content bbox p30 rp">
|
| | | <view class="tc b f24 c2 mb20">选择物料</view>
|
| | | <v-Search ref="V" @searchInput="searchInput" @submit="submit" :isShow="false" placeholder="搜索物料名称/编码">
|
| | | <view class="tc b f30 c2 mb20">选择物料a1</view>
|
| | | <v-Search ref="V" @searchInput="searchInput" @submit="search" :isShow="false" placeholder="搜索物料名称/编码">
|
| | | </v-Search>
|
| | | <div class="content_total">共{{pages.total}}条数据</div>
|
| | | <view class="scroll-content"> |
| | |
| | | show: false,
|
| | | splite: ' | ',
|
| | | isAll: false, |
| | | refreshing: false,
|
| | | refreshing: false, |
| | | mixName: '',
|
| | | pages: {
|
| | | capacity: 10,
|
| | | page: 1,
|
| | |
| | | open(target) {
|
| | | this.show = true |
| | | this.refreshing = false
|
| | | this.workorderId = target.workorderId
|
| | | this.warehouseId = target.warehouseId
|
| | | this.deviceId = target.deviceId
|
| | | this.list = [] |
| | | this.selectIndex = [] |
| | |
| | | total: 0
|
| | | }
|
| | | this.loadData()
|
| | | }, |
| | | // 搜索框 |
| | | searchInput(data) { |
| | | this.form.page = 0 |
| | | this.finished = false |
| | | this.list = [] |
| | | this.mixName = data |
| | | this.loadData() |
| | | },
|
| | | loadData() {
|
| | | choiceStockPageForStandard({
|
| | | ...this.pages,
|
| | | model: {
|
| | | workorderId: this.workorderId,
|
| | | deviceId: this.deviceId
|
| | | deviceId: this.deviceId, |
| | | materialName: this.mixName
|
| | | }
|
| | | }).then(res => { |
| | | let {data} = res |
| | |
| | | this.refreshing = true; |
| | | this.pages.page = 1
|
| | | this.loadData()
|
| | | }, |
| | | search() { |
| | | this.pages.page = 1 |
| | | this.loadData() |
| | | },
|
| | | selectMaterialAction(index) { |
| | | let i = this.selectIndex.findIndex(item => item==index) |
| | |
| | | <template>
|
| | | <u-popup :show="show" :round="10" closeable @close="show=false">
|
| | | <view class="material-content bbox p30">
|
| | | <view class="tc b f24 c2">选择物料</view>
|
| | | <view class="tc b f30 c2">选择物料</view>
|
| | | <scroll-view scroll-y="true" refresher-enabled="true" :refresher-triggered="refreshing"
|
| | | @scrolltolower="loadMore" @refresherrefresh="onRefresh">
|
| | | <view v-for="(item1, index) in list" :key="index" class="" style="height: 20px;" @click="jump(item1)">
|
| | | <view v-for="(item1, index) in list" :key="index" class="mb20" @click="jump(item1)">
|
| | | <div class="page_content_title_top">
|
| | | <span>{{ item1.materialName + ' | ' + item1.materialCode }}</span>
|
| | | </div>
|
| | |
| | |
|
| | | <style lang="scss" scoped>
|
| | | .material-content {
|
| | | height: 1100rpx;
|
| | | height: 1100rpx; |
| | | }
|
| | |
|
| | | .page_content_title_top {
|
| | | display: flex;
|
| | | align-items: center;
|
| | | justify-content: space-between;
|
| | |
|
| | | span {
|
| | | &:nth-child(1) {
|
| | | font-size: 30rpx;
|
| | |
| | | <view class="mr10 b">{{ `${orederMessage.mmodel.name} |${orederMessage.procedureName}`}}</view>
|
| | | <u-tag size="mini" bgColor="#03AF76" text="正常"></u-tag>
|
| | | </view>
|
| | | <view class="status" :class="orederMessage.status==0?'wc':orederMessage.status==1?'green':orederMessage.status==3?'blue':orederMessage.status==7?'green':'c6'">{{ stausToStr(1) }}</view>
|
| | | <view class="status" :class="orederMessage.status==0?'wc':orederMessage.status==1?'green':orederMessage.status==3?'blue':orederMessage.status==7?'green':'c6'">{{ stausToStr(orederMessage.status) }}</view>
|
| | | </view> |
| | | <view class="f24 c6 mt20">工单编号:{{ orederMessage.code || 'GD202111240001' }}</view> |
| | | <view class="mt20 bg_f7 ptb20 plr30 n"> |
| | | <view class="f24 c6 mt20">工单编号:{{ orederMessage.code || '-' }}</view> |
| | | <view class="f24 mt20 bg_f7 ptb20 plr30 n"> |
| | | <view class="c2 mb20"> |
| | | <span class="c6">物料编码:</span> |
| | | {{ orederMessage.mmodel ? orederMessage.mmodel.code : '-' }} |
| | |
| | | }).then(res => {
|
| | | if (res.code === 200) {
|
| | | this.$store.dispatch('getUpcomingNum') |
| | | uni.$u.toast('操作成功')
|
| | | // Toast.success({
|
| | | // message: '操作成功',
|
| | | // forbidClick: true,
|
| | | // duration: 2000
|
| | | // }) |
| | | uni.$u.toast('操作成功') |
| | | if (this.type == '4') { // 跳转完工入库详情 |
| | | // uni.navigateTo({ |
| | | // url: |
| | | // }) |
| | | // router.push({ |
| | | // name: 'completionDetails', |
| | | // query: { |
| | | // id: route.query.id, |
| | | // dbid: route.query.dbid, |
| | | // type: 7, |
| | | // isShow: 2 |
| | | // } |
| | | // }) |
| | | return |
| | | } |
| | | uni.redirectTo({ |
| | | url: `/pages_adjust/pages/outboundDetails/outboundDetails?id=${this.id}` |
| | | }) |
| | |
|
| | | // setTimeout(() => {
|
| | | // if (route.query.Type == '4') { // 跳转完工入库详情
|
| | | // router.push({
|
| | | // name: 'completionDetails',
|
| | | // query: {
|
| | | // id: route.query.id,
|
| | | // dbid: route.query.dbid,
|
| | | // type: 7,
|
| | | // isShow: 2
|
| | | // }
|
| | | // })
|
| | | // return
|
| | | // }
|
| | | // router.replace({
|
| | | // name: 'wTransferDetail',
|
| | | // query: {
|
| | | // id: route.query.id
|
| | | // }
|
| | | // })
|
| | | // if (route.query.Type == '4') { // 跳转完工入库详情
|
| | | // router.push({
|
| | | // name: 'completionDetails',
|
| | | // query: {
|
| | | // id: route.query.id,
|
| | | // dbid: route.query.dbid,
|
| | | // type: 7,
|
| | | // isShow: 2
|
| | | // }
|
| | | // })
|
| | | // return
|
| | | // }
|
| | | // router.replace({
|
| | | // name: 'wTransferDetail',
|
| | | // query: {
|
| | | // id: route.query.id
|
| | | // }
|
| | | // })
|
| | | // }, 2000)
|
| | | }
|
| | | })
|
| | |
| | | }).then(res => {
|
| | | if (res.code === 200) {
|
| | | this.$store.dispatch('getUpcomingNum') |
| | | uni.$u.toast('操作成功')
|
| | | uni.$u.toast('操作成功') |
| | | uni.redirectTo({ |
| | | url: `/pages_adjust/pages/warehousingDetails1/warehousingDetails1?id=${this.id}` |
| | | })
|
| | | // Toast.success({
|
| | | // message: '操作成功',
|
| | | // forbidClick: true,
|
| | |
| | | onLoad(option) {
|
| | | this.type = option.type
|
| | | this.id = option.id
|
| | | this.isZKD = this.type == QRCodeType.ZKD
|
| | | this.isZKD = this.type == QRCodeType.ZKD |
| | | this.dbid = option.dbid
|
| | | if (option.dbid) {
|
| | | this.getDBs(option.dbid)
|
| | | } else {
|
| | |
| | | } else if (this.type == QRCodeType.ZKD) {
|
| | | infoAction = wTransferForInOut
|
| | | data.wTransferType = '0'
|
| | | }
|
| | | } |
| | | console.log('------');
|
| | | infoAction(data).then(res => {
|
| | | // this.warehouseId = this.info.wtransferWarehouseList[0].warehouseId
|
| | | console.log(this.type == QRCodeType.ZKD);
|
| | | if (this.isZKD) {
|
| | | this.info = res.data.wtransfer
|
| | | this.warehouseList = res.data.wtransferWarehouseList
|
| | | this.warehouseList = res.data.wtransferWarehouseList |
| | | this.warehouseId = this.warehouseList[0].warehouseId
|
| | | } else {
|
| | | this.info = res.data.woutbound
|
| | | this.woutboundDetailsWait = res.data.woutboundDetailsWait
|
| | | this.woutboundDetailsWait = res.data.woutboundDetailsWait |
| | | this.warehouseId = this.woutboundDetailsWait[0].warehouseId
|
| | | }
|
| | | }).catch(err => {
|
| | | uni.$u.toast(err)
|
| | |
| | | })
|
| | | })
|
| | | },
|
| | | submit() {
|
| | | submit() { |
| | | if (this.type == QRCodeType.ZKD) {
|
| | | if (this.outboundList.length > 0) {
|
| | | let result = this.outboundList.reduce((a, b) => {
|
| | |
| | | }).then(res => {
|
| | | if (res.code === 200) {
|
| | | this.$store.dispatch.dispatch('getUpcomingNum')
|
| | | uni.$u.toast('操作成功')
|
| | | uni.$u.toast('操作成功') |
| | | uni.redirectTo({ |
| | | url: `/pages_adjust/pages/outboundDetails/outboundDetails?id=${this.info.id}&dbid=${this.dbid}` |
| | | })
|
| | | // setTimeout(() => {
|
| | | // router.replace({ name: 'wTransferDetail', query: { id: info.value.wtransfer.id, dbid: route.query.dbid } })
|
| | | // }, 2000)
|
| | |
| | | }).then(res => {
|
| | | if (res.code === 200) {
|
| | | this.$store.dispatch.dispatch('getUpcomingNum')
|
| | | uni.$u.toast('操作成功')
|
| | | uni.$u.toast('操作成功') |
| | | uni.redirectTo({ |
| | | url: `/pages_adjust/pages/outboundDetails/outboundDetails?id=${this.info.id}` |
| | | })
|
| | | // setTimeout(() => {
|
| | | // // router.go(-1)
|
| | | // router.replace({ name: 'wOutboundDetail', query: { id: info.value.wtransfer.id } })
|
| | |
| | | bottom: 0;
|
| | | left: 30rpx;
|
| | | padding-bottom: 68rpx;
|
| | |
|
| | | z-index: 9999;
|
| | | .page_footer_qr {
|
| | | flex: 1;
|
| | | height: 88rpx;
|
| | |
| | | <image src="../../static/filter@2x.png" class="img48 ml20" @click="filterAction" mode=""></image>
|
| | | </view>
|
| | | <view class="cY mt30">
|
| | | <view v-for="item in tagList" :key="item.id" class="sbtn rd8 mr10"
|
| | | <view v-for="item in tagList" :key="item.id" class="tag_item mr10"
|
| | | :class="searchForm.status==item.id?'sbtn_green':'sbtn_black_rim'" @click="selectType(item.id)">
|
| | | {{`${item.name}(${item.num})`}}
|
| | | </view>
|
| | |
| | | <view class="content">
|
| | | <u-grid col="2" :border="false">
|
| | | <u-grid-item v-for="item in types" :key="item.id">
|
| | | <view class="ptb20 c9 type-style tc rd10" :class="type===item.id?'sbtn_green':'sbtn_gray'"
|
| | | <view class="ptb20 f26 c9 type-style tc rd10" :class="type===item.id?'sbtn_green':'sbtn_gray'"
|
| | | @click="type=item.id">{{ item.name }}</view>
|
| | | </u-grid-item>
|
| | | </u-grid>
|
| | |
| | | uni.getSystemInfo({
|
| | | success: res => {
|
| | | this.windowHeight = res.windowHeight
|
| | |
|
| | | }
|
| | | })
|
| | | this.loadData()
|
| | |
| | | uni.navigateTo({
|
| | | url: `/pages/InOperation/InOperation?id=${item.objId}&dbid=${item.id}&type=7`
|
| | | })
|
| | | // router.push({
|
| | | // name: 'warehousing',
|
| | | // query: {
|
| | | // id: item.objId,
|
| | | // dbid: item.id,
|
| | | // type: 7
|
| | | // }
|
| | | // })
|
| | | |
| | | } else if ((item.type === 1 || item.type === 4 || item.type === 6) && item.status === 1) {
|
| | | if (item.type === 4) { // 跳蛛完工入库详情
|
| | | // router.push({
|
| | |
| | | .bottom-view {
|
| | | left: 40rpx;
|
| | | right: 40rpx;
|
| | | bottom: 0
|
| | | bottom: 40rpx
|
| | | } |
| | | .tag_item { |
| | | min-width: 120rpx; |
| | | // padding: 0 24rpx; |
| | | border-radius: 26rpx; |
| | | text-align: center; |
| | | flex-shrink: 0; |
| | | margin-right: 20rpx; |
| | | border: 1rpx solid #CCCCCC; |
| | | font-size: 26rpx; |
| | | font-weight: 400; |
| | | height: 52rpx; |
| | | line-height: 52rpx; |
| | | }
|
| | | </style> |
| | |
| | | <span class="dw" v-if="info.umodel">{{info.umodel.name}}</span>
|
| | | </div>
|
| | | </div>
|
| | | <div class="inspection_list_item" @click="selectBad" v-show="form.blsl > 0">
|
| | | <div class="inspection_list_item" @click="selectBad" v-if="form.blsl > 0">
|
| | | <span>不良说明</span>
|
| | | <div class="right1">
|
| | | <span :style="form.blsm ? 'color: #000;' : ''">{{ form.blsm ? form.blsm : '点击选择不良原因'}}</span>
|
| | |
| | | <span class="dw" v-if="info.umodel">{{info.umodel.name}}</span>
|
| | | </div>
|
| | | </div>
|
| | | <div class="inspection_list_item" @click="selectBad" v-show="form.blsl > 0">
|
| | | <div class="inspection_list_item" @click="selectBad" v-if="Number(form.blsl) > 0">
|
| | | <span>不良说明</span>
|
| | | <div class="right1">
|
| | | <span :style="form.blsm ? 'color: #000;' : ''">{{ form.blsm ? form.blsm : '点击选择不良原因'}}</span>
|
| | |
| | | <div class="inspection_footer">
|
| | | <button class="inspection_footer_sub" @click="submit" v-preventReClick>提交</button>
|
| | | </div> |
| | | <u-picker :show="show1" title="请选择不良说明" :columns="columns" @cancel="show1=false" @confirm="badConfirm"></u-picker>
|
| | | <u-picker :show="show1" title="请选择不良说明" :columns="columns" keyName="name" @cancel="show1=false" @confirm="badConfirm"></u-picker>
|
| | | </view>
|
| | | </template>
|
| | |
|
| | |
| | | id: item.id |
| | | } |
| | | }) |
| | | console.log(bad); |
| | | this.columns = [bad] |
| | | }) |
| | | uni.$on('workOrder', (data) => { |
| | |
| | | <span class="dw" v-if="info.umodel">{{info.umodel.name}}</span>
|
| | | </div>
|
| | | </div>
|
| | | <div class="inspection_list_item" @click="selectBad" v-show="form.blsl > 0">
|
| | | <div class="inspection_list_item" @click="selectBad" v-if="form.blsl > 0">
|
| | | <span>不良说明</span>
|
| | | <div class="right1">
|
| | | <span :style="form.blsm ? 'color: #000;' : ''">{{ form.blsm ? form.blsm : '点击选择不良原因'}}</span>
|
| | |
| | | <div class="inspection_footer">
|
| | | <button class="inspection_footer_sub" @click="submit" v-preventReClick>提交</button>
|
| | | </div> |
| | | <u-picker :show="show1" title="请选择不良说明" :columns="columns" @cancel="show1=false" @confirm="badConfirm"></u-picker>
|
| | | <u-picker :show="show1" title="请选择不良说明" :columns="columns" keyName="name" @cancel="show1=false" @confirm="badConfirm"></u-picker>
|
| | | </view>
|
| | | </template>
|
| | |
|
| | |
| | | </view> |
| | | <view class="bg_w rd8 ptb30 pl40 bbox com-input flex input-height"> |
| | | <image src="@/static/login_ic_code@2x.png" mode="" class="img40 mr25"></image> |
| | | <u--input placeholder="企业代码" border="none" v-model="from.companyId"></u--input> |
| | | <u--input placeholder="企业代码" border="none" v-model="form.companyId"></u--input> |
| | | </view> |
| | | <view class="bg_w rd8 ptb30 pl40 bbox mt40 flex input-height"> |
| | | <image src="@/static/login_ic_phone@2x.png" mode="" class="img40 mr25"></image> |
| | | <u--input placeholder="手机号" border="none" v-model="from.username"></u--input> |
| | | <u--input placeholder="手机号" border="none" v-model="form.username"></u--input> |
| | | </view> |
| | | <view class="bg_w rd8 ptb30 pl40 bbox mt40 flex input-height"> |
| | | <image src="@/static/login_ic_password@2x.png" mode="" class="img40 mr25"></image> |
| | | <u--input placeholder="密码" border="none" v-model="from.password"></u--input> |
| | | <u--input placeholder="密码" border="none" password v-model="form.password"></u--input> |
| | | </view> |
| | | <view class="login-btn mt80" @click="loginAction">立即登录</view> |
| | | </view> |
| | |
| | | export default { |
| | | data() { |
| | | return { |
| | | from: { |
| | | form: { |
| | | openid: '', |
| | | unionid: '', |
| | | companyId: '', |
| | |
| | | }); |
| | | } |
| | | } else { |
| | | that.from.openid = res.data.openid |
| | | that.from.unionid = res.data.unionid |
| | | that.form.openid = res.data.openid |
| | | that.form.unionid = res.data.unionid |
| | | } |
| | | } |
| | | }) |
| | |
| | | }, |
| | | methods: { |
| | | async loginAction() { |
| | | if (!this.from.companyId) return uni.showToast({ title: '企业代码不能为空', icon:"error", duration: 2000 }); |
| | | if (!this.from.username) return uni.showToast({ title: '手机号不能为空', icon:"error", duration: 2000 }); |
| | | if (!this.from.password) return uni.showToast({ title: '密码不能为空', icon:"error", duration: 2000 }); |
| | | let res = await wxAccountLogin(this.from) |
| | | if (!this.form.companyId) return uni.showToast({ title: '企业代码不能为空', icon:"error", duration: 2000 }); |
| | | if (!this.form.username) return uni.showToast({ title: '手机号不能为空', icon:"error", duration: 2000 }); |
| | | if (!this.form.password) return uni.showToast({ title: '密码不能为空', icon:"error", duration: 2000 }); |
| | | let res = await wxAccountLogin(this.form) |
| | | if (res.code === 200) { |
| | | await this.$store.commit('SETSESSION', res.data) |
| | | let user = await getUserInfo({}) |
| | |
| | | } |
| | | .com-input { |
| | | margin-top: -60px; |
| | | position: relative; |
| | | z-index: 2; |
| | | } |
| | | .login-btn { |
| | | height: 98rpx; |
| | |
| | | width: 350rpx;
|
| | | height: 88rpx;
|
| | | background: #F7F7F7;
|
| | | border-radius: 8rpx;
|
| | | border-radius: 44rpx;
|
| | | display: flex;
|
| | | align-items: center;
|
| | | justify-content: center;
|
| | |
| | | <span>{{row.label}}</span>
|
| | | </view>
|
| | | <div class="menu_list_list">
|
| | | <view class="menu_list_item" v-for="item in row.children" :key="item.id" @click="jump(item.url)">
|
| | | <view class="menu_list_item" v-for="item in row.children" :key="item.id" @click="jump(item.urlSec)">
|
| | | <image :src="item.icon" mode="widthFix" />
|
| | | <span>{{item.label}}</span>
|
| | | </view>
|
| | |
| | | };
|
| | | },
|
| | | onLoad() { |
| | | this.$store.dispatch('getUpcomingNum') |
| | | uni.hideTabBar()
|
| | | },
|
| | | methods: {
|
| | |
| | | <view class="material-content bbox p30 rp"> |
| | | <view class="tc b f24 c2 mb20">选择物料</view> |
| | | <v-Search @searchInput="searchInput" @submit="submit" :isShow="false" placeholder="搜索物料名称/编码" /> |
| | | <div class="content_total">共{{form.total}}条数据</div> |
| | | <div class="content_total">共{{form.total}}条数据12</div> |
| | | <view class="scroll-content"> |
| | | <!-- refresher-enabled="true" |
| | | :refresher-triggered="refreshing" |
| | |
| | | this.form.page = 0 |
| | | this.finished = false |
| | | this.list = [] |
| | | this.onLoad() |
| | | this.loadData() |
| | | }, |
| | | // 搜索框 |
| | | searchInput(data) { |
| | |
| | | this.finished = false |
| | | this.list = [] |
| | | this.form.smodelLabel = data |
| | | this.onLoad() |
| | | this.loadData() |
| | | }, |
| | | loadData() { |
| | | if (!this.finished) { |
| | |
| | | model: { |
| | | warehouseId: this.warehouseId, |
| | | warehouseQualityType: this.warehouseQualityType, |
| | | ids: this.selected.length > 0 ? this.selected.join(',') : '' |
| | | ids: this.selected.length > 0 ? this.selected.join(',') : '', |
| | | materialName: this.form.smodelLabel |
| | | } |
| | | }).then(res => { |
| | | if (this.refreshing) { |
| | |
| | | <template>
|
| | | <view>
|
| | | <workOrderInfo :orederMessage="info" />
|
| | | <view class="bg_cate">
|
| | | <!-- <view class="bg_cate">
|
| | | <view @click="clickIten(index)" :class="typeView == index ? 'bg_cate_item active' : 'bg_cate_item'"
|
| | | v-for="(item, index) in cate" :key="index">{{ item.name }}</view>
|
| | | </view>
|
| | | <div class="bg_list" v-if="typeView === 0">
|
| | | </view> -->
|
| | | <div class="bg_list">
|
| | | <div class="bg_list_item">
|
| | | <div class="bg_list_item_top">
|
| | | <div class="bg_list_item_top_left">
|
| | | <div class="bg_list_item_top_left_x bg_m"></div>
|
| | | <span>投料明细</span>
|
| | | </div>
|
| | | <div class="bg_list_item_top_right" @click="jumpTL">
|
| | | <!-- v-if="proxy.$auth('h5:workorderinput:create') && (info.bomType !== 1 || info.bomType == 0 || !info.bomType)" -->
|
| | | <!-- <img src="@/assets/icon/gongdan_ic_shoudong@2x.png" alt="" /> -->
|
| | | <!-- <img src="@/static/gongdan_ic_shoudong@2x.ong" alt="" /> -->
|
| | | <image src="../../static/gongdan_ic_shoudong@2x.png" class="img28" mode=""></image>
|
| | | <span class="cm">新增投料</span>
|
| | | </div>
|
| | | </div>
|
| | |
|
| | | <template v-if="feedingData && feedingData.length > 0">
|
| | | <u-swipe-action>
|
| | | <u-swipe-action-item v-for="(item, index) in feedingData" :key="index" :options="options"
|
| | | @click="deleItem(item.id, 'T')">
|
| | | <view>
|
| | | <view v-for="(item, index) in feedingData" :key="index">
|
| | | <div class="bg_list_item_h">
|
| | | <div class="bg_list_item_num">
|
| | | <div class="bg_list_item_num_item">
|
| | | <!-- <span>{{item.code}}</span> -->
|
| | | <div class="bg_list_item_num_item_wl">
|
| | | <span> {{ item.materialName || '墙体砖' }}{{ item.procedureName ? ` | ${item.procedureName}` : ''
|
| | | }}</span>
|
| | |
| | | </div>
|
| | | </div>
|
| | | <div class="bg_list_item_num_item_sr">
|
| | | <!-- :disabled="!proxy.$auth('h5:workorderinput:update')" --> |
| | | <!-- <view class="cY"> |
| | | <span>{{item.num}}{{ item.unitName }}</span> |
| | | <image src="../../../static/ic_edit@2x.png" class="img48" mode=""></image> |
| | | <span class="red">删除</span> |
| | | </view> --> |
| | | <view class="cY"> |
| | | <input v-model="item.num" |
| | | @blur="change(item.id, item.num, 'T', item.maxNum, item, item.unitAttribute)" |
| | | type="number" /> |
| | | <span class="cm">保存</span> |
| | | <view class="cY">
|
| | | <view class="mr10">{{ item.num }}</view> |
| | | <span v-if="info.umodel">{{ info.umodel.name }}</span>
|
| | | </view>
|
| | | |
| | |
|
| | | </div>
|
| | | </div>
|
| | | </div>
|
| | | </div>
|
| | | </u-swipe-action-item>
|
| | | </u-swipe-action>
|
| | | </view>
|
| | | </view>
|
| | |
|
| | | </template>
|
| | | <template v-else>
|
| | |
| | | <div class="bg_list_item_top_left">
|
| | | <div class="bg_list_item_top_left_x bg_m"></div>
|
| | | <span>产出明细</span>
|
| | | </div> |
| | | <div class="bg_list_item_top_right" @click="proRecord"> |
| | | <span style="color: #4275FC;">查看检验记录</span> |
| | | <u-icon name="arrow-right" color="#4275FC" /> |
| | | </div>
|
| | | </div>
|
| | | <div class="bg_list_item_h">
|
| | |
| | | <div class="bg_list_item_num_item">
|
| | | <span>良品数{{ info.umodel ? `(${info.umodel.name})` : '' }}</span>
|
| | | <div class="bg_list_item_num_item_sr">
|
| | | <!-- :disabled="!proxy.$auth('h5:workorderoutput:update')" -->
|
| | | <!-- @blur="change(item.id, item.num, 'C', item.maxNum, item)" -->
|
| | | <input type="number" v-model="produceFrom.qualified"
|
| | | @blur="changeCC('0', produceFrom.qualified, produceFrom.qualifiedId)"
|
| | | placeholder="请输入" />
|
| | | <view class="mr10">{{ produceFrom.qualified }}</view>
|
| | | <span v-if="info.umodel">{{ info.umodel.name }}</span>
|
| | | </div>
|
| | | </div>
|
| | |
| | | </div>
|
| | | <div class="bg_list_item_h">
|
| | | <div class="bg_list_item_num">
|
| | | <!-- @blur="change(item.id, item.num, 'C', item.maxNum, item)" -->
|
| | | <div class="bg_list_item_num_item">
|
| | | <span>不良数{{ info.umodel ? `(${info.umodel.name})` : '' }}</span>
|
| | | <div class="bg_list_item_num_item_sr">
|
| | | <!-- :disabled="!proxy.$auth('h5:workorderoutput:update')" -->
|
| | | <!-- @blur="change(item.id, item.num, 'C', item.maxNum, item)" -->
|
| | | <input type="number" v-model="produceFrom.undesirable"
|
| | | @blur="changeCC('1', produceFrom.undesirable, produceFrom.undesirableId)"
|
| | | placeholder="请输入" />
|
| | | <view class="mr10">{{ produceFrom.undesirable }}</view>
|
| | | <span v-if="info.umodel">{{ info.umodel.name }}</span>
|
| | | </div>
|
| | | </div>
|
| | | </div>
|
| | | </div>
|
| | | <div class="bg_list_item_h" v-if="produceFrom.undesirable > 0">
|
| | | <div class="bg_list_item_num">
|
| | | <div class="bg_list_item_num_item" @click="badShow = true">
|
| | | <span>不良项</span>
|
| | | <div class="bg_list_item_num_item_sr">
|
| | | <span class="wulll" :style="{ color: form.defectiveName ? '#305ED5' : '' }">{{ form.defectiveName ?
|
| | | form.defectiveName : '设置' }}</span>
|
| | | <image src="../../../static/ic_ar@2x.png" class="img_ar" mode=""></image>
|
| | | </div>
|
| | | </div>
|
| | | </div>
|
| | | </div>
|
| | | </div>
|
| | | <div class="bg_plan" @click="TimeShow = true">
|
| | | <div class="bg_plan_label">
|
| | | <span>报工时长</span>
|
| | | </div>
|
| | | <div class="bg_plan_label_val">
|
| | | <span
|
| | | :style="{ color: form.durationName ? '#333' : '' }">{{ form.durationName ? form.durationName : '请选择' }}</span>
|
| | | <image src="../../../static/ic_ar@2x.png" class="img_ar" mode=""></image>
|
| | | </div>
|
| | | </div>
|
| | | <div class="bg_list_item" v-if="arrType && arrType.length > 0">
|
| | | <div class="bg_list_item_top">
|
| | | <div class="bg_list_item_top_left">
|
| | | <div class="bg_list_item_top_left_x bg_m"></div>
|
| | | <span>工资绩效</span>
|
| | | </div>
|
| | | </div>
|
| | | <div class="bg_list_item_h">
|
| | | <div class="bg_list_item_num">
|
| | | <div class="bg_list_item_num_item">
|
| | | <span>计件方式</span>
|
| | | <div class="bg_list_item_num_item_list">
|
| | | <div :class="form.index == index ? 'bg_list_item_num_item_list_item active' : 'bg_list_item_num_item_list_item'"
|
| | | v-for="(item, index) in arrType" :key="index"
|
| | | @click="clickPerformanceType(item, index)">
|
| | | {{ item.name }}
|
| | | </div>
|
| | | </div>
|
| | | </div>
|
| | | </div>
|
| | | <div class="bg_list_item_num">
|
| | | <div class="bg_list_item_num_item">
|
| | | <span>工资单价</span>
|
| | | <div class="bg_list_item_num_item_sr">
|
| | | <span class="color1">{{ (arrType[form.index].salary / 10 / 10).toFixed(2) }}元/{{ arrType[form.index].type ==
|
| | | 0 ? '件' : '时' }}</span>
|
| | | </div>
|
| | | </div>
|
| | | </div>
|
| | | <div class="bg_list_item_num">
|
| | | <div class="bg_list_item_num_item">
|
| | | <span>预计工资</span>
|
| | | <div class="bg_list_item_num_item_sr">
|
| | | <span class="color1">{{ expectedSalary }}元</span>
|
| | | </div>
|
| | | </div>
|
| | | </div>
|
| | | <div class="bg_list_item_num">
|
| | | <div class="bg_list_item_num_item">
|
| | | <span>达标率</span>
|
| | | <div class="bg_list_item_num_item_sr">
|
| | | <span class="color1">{{ complianceRate }}%</span>
|
| | | </div>
|
| | | </div>
|
| | | </div>
|
| | | </div>
|
| | | </div>
|
| | |
|
| | | </div> |
| | | <div class="bg_list_item"> |
| | | <div class="bg_list_item_top"> |
| | | <div class="bg_list_item_top_left"> |
| | | <div class="bg_list_item_top_left_x bg_m"></div> |
| | | <span>生产点检</span> |
| | | </div> |
| | | </div> |
| | | <template v-if="djData && djData.length > 0"> |
| | | <div class="details_dj"> |
| | | |
| | | <div class="details_dj_list"> |
| | | <scroll-view scroll-y="true" refresher-enabled="true" @scrolltolower="getLists"> |
| | | <view v-for="(item, index) in djData" :key="index"> |
| | | <div class="details_dj_list_item"> |
| | | <span>{{ item.attrName }}:{{ item.val }}</span> |
| | | <span>{{ item.userName }} {{ item.createTime }}</span> |
| | | </div> |
| | | </view> |
| | | </scroll-view> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | <template v-else> |
| | | <div class="kong"> |
| | | <span>暂无数据</span> |
| | | </div> |
| | | </template> |
| | | </div> |
| | | </div>
|
| | | <div class="details_dj" v-if="typeView === 1">
|
| | |
|
| | | <div class="details_dj_list"> |
| | | <scroll-view scroll-y="true" refresher-enabled="true" @scrolltolower="getLists"> |
| | | <u-swipe-action v-for="(item, index) in djData" :key="index"> |
| | | <u-swipe-action-item :options="options" @click="dele(item.id)"> |
| | | <div class="details_dj_list_item"> |
| | | <span>{{ item.attrName }}:{{ item.val }}</span> |
| | | <span>{{ item.userName }} {{ item.createTime }}</span> |
| | | </div> |
| | | </u-swipe-action-item> |
| | | </u-swipe-action> |
| | | </scroll-view>
|
| | | <!-- <u-swipe-action>
|
| | | <u-swipe-action-item v-for="(item, index) in djData" :key="index" :options="options"
|
| | | @click="dele(item.id)">
|
| | | <div class="details_dj_list_item">
|
| | | <span>{{ item.attrName }}:{{ item.val }}</span>
|
| | | <span>{{ item.userName }} {{ item.createTime }}</span>
|
| | | </div>
|
| | | </u-swipe-action-item>
|
| | | </u-swipe-action> -->
|
| | | </div>
|
| | | </div>
|
| | | <!-- v-if="info.status === 2 || info.procedureNeedcheck === 1" -->
|
| | | <template>
|
| | | <div class="bh_zw"></div>
|
| | | <div class="bg_footer bg_f7">
|
| | | <div class="bg_footer_submit bg_m" v-if="typeView == 0" @click="submit">确认报工</div>
|
| | | <!-- proxy.$auth('h5:workorder:processRecord') && -->
|
| | | <div class="bg_footer_submit1" @click="jumpdj" v-if="typeView == 1">
|
| | | <image src="../../../static/gongdan_ic_shoudong@2x.png" class="fornt-img" mode=""></image>
|
| | | <span>新增点检</span>
|
| | | </div>
|
| | | </div>
|
| | | </template>
|
| | | <u-datetime-picker :show="TimeShow" @cancel="TimeShow=false" @confirm="timeConfirm" v-model="form.time"
|
| | | mode="time"></u-datetime-picker>
|
| | | <u-popup :show="badShow" @close="badShow=false" :round="8" closeable zIndex="20000">
|
| | | <view class="rp p40 contanir">
|
| | | <view class="c2 b tc">不良项</view>
|
| | | <view class="content bl_list">
|
| | | <div class="bl_list_item" v-for="(item, i) in cateList" :key="i" @click="changeChecked(i)">
|
| | | <div class="bl_list_item_left"> |
| | | <u-checkbox-group> |
| | | <u-checkbox :checked="item.active" :label="item.name" |
| | | :name="item.name"> |
| | | </u-checkbox> |
| | | </u-checkbox-group>
|
| | | </div>
|
| | | <div class="bl_list_item_right">
|
| | | <input type="number" @click.stop v-model="item.num" placeholder="0" />
|
| | | </div>
|
| | | </div>
|
| | | </view>
|
| | | <view class="flex ap tc bottom-view">
|
| | | <view class="fx1 ml20 ptb20 sbtn_green" @click="confirm">确定</view>
|
| | | </view>
|
| | | </view>
|
| | | </u-popup>
|
| | | |
| | | </view>
|
| | | </template>
|
| | |
|
| | | <script>
|
| | | import workOrderInfo from '@/components/workOrderInfo.vue' |
| | | import { |
| | | getBarcodeContent, |
| | | queryById, |
| | | getOrocessRecord, |
| | | deleteCT, |
| | | updateById, |
| | | comfirmDone, |
| | | comfirmDoneStandard, |
| | | getListByCondition, |
| | | allForStandard, |
| | | pageDJ, |
| | | deletedj, |
| | | dealWorkorderRecordStandard, |
| | | getWorkorderRecordListStandard, |
| | | createMaterial, |
| | | createMaterialStandard |
| | | } from '@/util/api/WorkOrderAPI' |
| | | import { |
| | | categoryExtList, |
| | | queryOne, |
| | | queryList |
| | | } from '@/util/api/PlanningAPI' |
| | | import { REGULAR } from '@/util/utils' |
| | | import workOrderInfo from '@/components/workOrderInfo.vue'
|
| | | import {
|
| | | getBarcodeContent,
|
| | | queryById,
|
| | | getOrocessRecord,
|
| | | deleteCT,
|
| | | updateById,
|
| | | comfirmDone,
|
| | | comfirmDoneStandard,
|
| | | getListByCondition,
|
| | | allForStandard,
|
| | | pageDJ,
|
| | | deletedj,
|
| | | dealWorkorderRecordStandard,
|
| | | getWorkorderRecordListStandard,
|
| | | createMaterial,
|
| | | createMaterialStandard
|
| | | } from '@/util/api/WorkOrderAPI'
|
| | | import {
|
| | | categoryExtList,
|
| | | queryOne,
|
| | | queryList
|
| | | } from '@/util/api/PlanningAPI'
|
| | | import {
|
| | | REGULAR
|
| | | } from '@/util/utils'
|
| | | export default {
|
| | | components: {
|
| | | workOrderInfo
|
| | | },
|
| | | data() {
|
| | | return { |
| | | return {
|
| | | workorderId: '',
|
| | | cate: [{
|
| | | name: '生产'
|
| | | },
|
| | | {
|
| | | name: '点检'
|
| | | }],
|
| | | }
|
| | | ],
|
| | | form: {
|
| | | time: '',
|
| | | efective: [],
|
| | |
| | | duration: 0,
|
| | | type: 0,
|
| | | index: 0
|
| | | }, |
| | | },
|
| | | info: {},
|
| | | TimeShow: false,
|
| | | badShow: false,
|
| | |
| | | undesirable: 5 // 不良
|
| | | },
|
| | | djData: [],
|
| | | cateList: [], |
| | | cateList: [],
|
| | | finished: true,
|
| | | };
|
| | | }, |
| | | onLoad(obj) { |
| | | this.workorderId = obj.id |
| | | this.queryByIds() |
| | | this.getOrocessRecords() |
| | | this.getData() |
| | | uni.$on('spotAdd', () => { |
| | | if (this.typeView == 1) { |
| | | this.pages.page = 1 |
| | | this.pageDJs() |
| | | } |
| | | }) |
| | | },
|
| | | onLoad(obj) {
|
| | | this.workorderId = obj.id
|
| | | this.queryByIds()
|
| | | this.getOrocessRecords()
|
| | | this.getData()
|
| | | this.getOrocessRecordCC()
|
| | | uni.$on('spotAdd', () => {
|
| | | if (this.typeView == 1) {
|
| | | this.pages.page = 1
|
| | | this.pageDJs()
|
| | | }
|
| | | })
|
| | | },
|
| | | computed: {
|
| | | expectedSalary() {
|
| | |
| | | // return Number(from.qualified) * infoBox.value.salary;
|
| | | }
|
| | | }
|
| | | }, |
| | | },
|
| | | methods: {
|
| | | getData() { |
| | | categoryExtList({ |
| | | cateType: "3" |
| | | }).then(res => { |
| | | if (res.code === 200) { |
| | | res.data.forEach(item => { |
| | | item.active = false |
| | | item.num = '' |
| | | }) |
| | | this.cateList = res.data |
| | | } |
| | | }) |
| | | getData() {
|
| | | categoryExtList({
|
| | | cateType: "3"
|
| | | }).then(res => {
|
| | | if (res.code === 200) {
|
| | | res.data.forEach(item => {
|
| | | item.active = false
|
| | | item.num = ''
|
| | | })
|
| | | this.cateList = res.data
|
| | | }
|
| | | })
|
| | | },
|
| | | clickIten(index) {
|
| | | this.typeView = index |
| | | if (this.typeView == 1) { |
| | | this.pages.page = 1 |
| | | this.finished = true |
| | | this.pageDJs() |
| | | this.typeView = index
|
| | | if (this.typeView == 1) {
|
| | | this.pages.page = 1
|
| | | this.finished = true
|
| | | this.pageDJs()
|
| | | }
|
| | | }, |
| | | getLists() { |
| | | if (!this.finished) { |
| | | return |
| | | } |
| | | this.finished = false |
| | | this.pages.page += 1 |
| | | this.pageDJs() |
| | | },
|
| | | getLists() {
|
| | | if (!this.finished) {
|
| | | return
|
| | | }
|
| | | this.finished = false
|
| | | this.pages.page += 1
|
| | | this.pageDJs()
|
| | | },
|
| | | timeConfirm({
|
| | | value
|
| | |
| | | if (type === 'T') {
|
| | | if (unitAttribute == 0 && num != '') {
|
| | | if (!REGULAR.positiveInteger.test(num)) {
|
| | | obj.num = obj.ynum |
| | | obj.num = obj.ynum
|
| | | uni.$u.toast('只能输入正整数')
|
| | | return
|
| | | }
|
| | | }
|
| | | if (unitAttribute == 1 && num != '') {
|
| | | if (!REGULAR.number.test(num)) { |
| | | if (!REGULAR.number.test(num)) {
|
| | | uni.$u.toast('只能输入正整数或小数(最多四位)')
|
| | | |
| | |
|
| | | obj.num = obj.ynum
|
| | | return
|
| | | }
|
| | | }
|
| | | if (num > maxNum) {
|
| | | obj.num = obj.ynum |
| | | obj.num = obj.ynum
|
| | | uni.$u.toast('超出工装总数')
|
| | | |
| | |
|
| | | return
|
| | | }
|
| | | } else if (type === 'C' && num > info.value.planNum) {
|
| | | obj.num = obj.ynum |
| | | obj.num = obj.ynum
|
| | | uni.$u.toast('产出数量不能超过计划数量')
|
| | | |
| | |
|
| | | return
|
| | | }
|
| | | |
| | |
|
| | | },
|
| | | clickPerformanceType(item, index) {
|
| | | this.form.index = index
|
| | | this.form.type = item.type
|
| | | },
|
| | | submit() { |
| | | |
| | | submit() {
|
| | |
|
| | | },
|
| | | jumpdj() { |
| | | jumpdj() {
|
| | | uni.navigateTo({
|
| | | url: `/pages_adjust/pages/spotCheck/spotCheck?id=${this.workorderId}`
|
| | | })
|
| | | }, |
| | | proRecord() { |
| | | uni.navigateTo({ |
| | | url: `/pages_adjust/pages/spotCheck/spotCheck?id=${this.workorderId}` |
| | | url: `/pages_inspect/pages/InspectionRecords/InspectionRecords?id=${this.workorderId}` |
| | | }) |
| | | },
|
| | | pageDJs() { |
| | | pageDJ({ |
| | | capacity: this.pages.capacity, |
| | | page: this.pages.page, |
| | | model: { |
| | | workorderId: this.workorderId |
| | | } |
| | | }).then(res => { |
| | | let {data} = res |
| | | if (data.page == 1) { |
| | | this.djData = [] |
| | | } |
| | | this.djData.push(...data.records) |
| | | // loading.value = false |
| | | }).catch(err => { |
| | | // loading.value = false |
| | | // finished.value = true |
| | | }) |
| | | .finally(() => { |
| | | this.finished = true |
| | | }) |
| | | pageDJs() {
|
| | | pageDJ({
|
| | | capacity: this.pages.capacity,
|
| | | page: this.pages.page,
|
| | | model: {
|
| | | workorderId: this.workorderId
|
| | | }
|
| | | }).then(res => {
|
| | | let {
|
| | | data
|
| | | } = res
|
| | | if (data.page == 1) {
|
| | | this.djData = []
|
| | | }
|
| | | this.djData.push(...data.records)
|
| | | // loading.value = false
|
| | | }).catch(err => {
|
| | | // loading.value = false
|
| | | // finished.value = true
|
| | | })
|
| | | .finally(() => {
|
| | | this.finished = true
|
| | | })
|
| | | },
|
| | | dele(id) {
|
| | | deletedj(id)
|
| | | .then(res => {
|
| | | if (res.code === 200) {
|
| | | this.finished = false
|
| | | this.pages.page = 1
|
| | | this.pageDJs()
|
| | | }
|
| | | })
|
| | | .then(res => {
|
| | | if (res.code === 200) {
|
| | | this.finished = false
|
| | | this.pages.page = 1
|
| | | this.pageDJs()
|
| | | }
|
| | | })
|
| | | },
|
| | | confirm() { |
| | | let isOpen = false |
| | | this.cateList.forEach((item, index) => { |
| | | if (item.active) { |
| | | isOpen = true |
| | | } |
| | | }) |
| | | if (!isOpen) { |
| | | uni.showToast({ |
| | | title: '请选择不良项', |
| | | duration: 2000, |
| | | icon: 'none' |
| | | }) |
| | | return |
| | | } |
| | | let arr = [] |
| | | let total = 0 |
| | | let name = '' |
| | | this.cateList.forEach((item, index) => { |
| | | if (item.active) { |
| | | if (item.num <= 0) { |
| | | uni.showToast({ |
| | | title: '不良数量必须大于0', |
| | | duration: 2000, |
| | | icon: 'none' |
| | | }) |
| | | return |
| | | } |
| | | total = total += item.num |
| | | arr.push(item) |
| | | name += item.name + item.num + ';' |
| | | } |
| | | }) |
| | | if (total != Number(this.produceFrom.undesirable)) { |
| | | uni.showToast({ |
| | | title: '不良数必须等于产出不良数', |
| | | duration: 2000, |
| | | icon: 'none' |
| | | }) |
| | | return |
| | | } |
| | | this.form.defective = arr |
| | | confirm() {
|
| | | let isOpen = false
|
| | | this.cateList.forEach((item, index) => {
|
| | | if (item.active) {
|
| | | isOpen = true
|
| | | }
|
| | | })
|
| | | if (!isOpen) {
|
| | | uni.showToast({
|
| | | title: '请选择不良项',
|
| | | duration: 2000,
|
| | | icon: 'none'
|
| | | })
|
| | | return
|
| | | }
|
| | | let arr = []
|
| | | let total = 0
|
| | | let name = ''
|
| | | this.cateList.forEach((item, index) => {
|
| | | if (item.active) {
|
| | | if (item.num <= 0) {
|
| | | uni.showToast({
|
| | | title: '不良数量必须大于0',
|
| | | duration: 2000,
|
| | | icon: 'none'
|
| | | })
|
| | | return
|
| | | }
|
| | | total = total += item.num
|
| | | arr.push(item)
|
| | | name += item.name + item.num + ';'
|
| | | }
|
| | | })
|
| | | if (total != Number(this.produceFrom.undesirable)) {
|
| | | uni.showToast({
|
| | | title: '不良数必须等于产出不良数',
|
| | | duration: 2000,
|
| | | icon: 'none'
|
| | | })
|
| | | return
|
| | | }
|
| | | this.form.defective = arr
|
| | | this.form.defectiveName = name
|
| | | this.badShow = false
|
| | | },
|
| | | changeChecked(i) {
|
| | | this.cateList[i].active = !this.cateList[i].active
|
| | | }, |
| | | queryByIds() { |
| | | queryById(this.workorderId) |
| | | .then(res => { |
| | | this.info = res.data |
| | | queryList({ |
| | | deleted: 0, |
| | | departId: res.data.factoryId, |
| | | materialId: res.data.materialId, |
| | | procedureId: res.data.procedureId |
| | | }).then(result => { |
| | | if (result.code === 200) { |
| | | if (result.data && result.data.length > 0) { |
| | | result.data.forEach((item, index) => { |
| | | item.name = item.type == 0 ? '计件' : '计时' |
| | | item.id = item.type |
| | | item.active = index == 0 |
| | | }) |
| | | this.arrType = result.data |
| | | } else { |
| | | this.arrType = [] |
| | | } |
| | | } |
| | | }) |
| | | }) |
| | | }, |
| | | getOrocessRecords() { |
| | | this.feedingData = [] |
| | | allForStandard({ |
| | | workorderId: this.workorderId, |
| | | type: 0 |
| | | }).then(res => { |
| | | if (res.code === 200) { |
| | | this.feedingData = res.data |
| | | } |
| | | }) |
| | | }, |
| | | jumpTL() { |
| | | uni.navigateTo({ |
| | | // url: '' |
| | | url: `/pages_adjust/pages/manualFeed/manualFeed?id=${this.workorderId}` |
| | | }) |
| | | },
|
| | | queryByIds() {
|
| | | queryById(this.workorderId)
|
| | | .then(res => {
|
| | | this.info = res.data
|
| | | queryList({
|
| | | deleted: 0,
|
| | | departId: res.data.factoryId,
|
| | | materialId: res.data.materialId,
|
| | | procedureId: res.data.procedureId
|
| | | }).then(result => {
|
| | | if (result.code === 200) {
|
| | | if (result.data && result.data.length > 0) {
|
| | | result.data.forEach((item, index) => {
|
| | | item.name = item.type == 0 ? '计件' : '计时'
|
| | | item.id = item.type
|
| | | item.active = index == 0
|
| | | })
|
| | | this.arrType = result.data
|
| | | } else {
|
| | | this.arrType = []
|
| | | }
|
| | | }
|
| | | })
|
| | | })
|
| | | },
|
| | | getOrocessRecords() {
|
| | | this.feedingData = []
|
| | | allForStandard({
|
| | | workorderId: this.workorderId,
|
| | | type: 0
|
| | | }).then(res => {
|
| | | if (res.code === 200) {
|
| | | this.feedingData = res.data
|
| | | }
|
| | | })
|
| | | },
|
| | | getOrocessRecordCC() {
|
| | | getWorkorderRecordListStandard({
|
| | | workorderId: this.workorderId
|
| | | }).then(res => {
|
| | | if (res.data.length > 0) { |
| | | this.produceFrom.qualified = res.data[0].qualifiedNum |
| | | this.produceFrom.undesirable = res.data[0].unqualifiedNum |
| | | }
|
| | | })
|
| | | },
|
| | | jumpTL() {
|
| | | uni.navigateTo({
|
| | | // url: ''
|
| | | url: `/pages_adjust/pages/manualFeed/manualFeed?id=${this.workorderId}`
|
| | | })
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | display: flex;
|
| | | align-items: center;
|
| | | justify-content: flex-end;
|
| | |
|
| | | font-size: 28rpx;
|
| | | .color1 {
|
| | | font-size: 28rpx;
|
| | | |
| | | font-family: PingFangSC-Regular, PingFang SC;
|
| | | font-weight: 400;
|
| | | color: #333333;
|
| | |
| | | </div>
|
| | | </u-swipe-action-item>
|
| | | </u-swipe-action>
|
| | | <view class="" style="height: 88rpx;"></view>
|
| | | <u-safe-bottom></u-safe-bottom>
|
| | | <div class="tl_footer">
|
| | | <button class="tl_footer_submit" v-preventReClick @click="submit">提交</button>
|
| | | </div>
|
| | | <SelectMaterial ref="selectMaterial" @selectAction="getValue" />
|
| | | <!-- <SelectMultipleMaterial ref="selectMultipleMaterial" @selected="getMaterails"/> -->
|
| | | </view>
|
| | |
| | | this.materialList[index].num = ''
|
| | | }
|
| | | },
|
| | | getValue(v) {
|
| | | getValue(item) {
|
| | | for (let i = 0; i < this.materialList.length; i++) {
|
| | | if (item.id === this.materialList[i].id) {
|
| | | uni.$u.toast({
|
| | |
| | | this.materialList[this.index].qualityType = item.qualityType
|
| | | this.materialList[this.index].unitAttribute = item.unitAttribute
|
| | | },
|
| | | // getMaterails({materials}) {
|
| | | // console.log(item);
|
| | | // }
|
| | | submit() {
|
| | | let temp = this.materialList.findIndex(item => !item.id || !item.num)
|
| | | if (temp != -1) {
|
| | | uni.$u.toast(`请先完善第${temp + 1}条投料信息`)
|
| | | return
|
| | | }
|
| | | let total = this.materialList.reduce((accumulator, currentValue) => accumulator + Number(currentValue.num),
|
| | | 0)
|
| | | console.log(total);
|
| | | if (this.info.bomType != 1 && this.info.hasBom != 1) {
|
| | | if (total > this.info.planNum) {
|
| | | uni.$u.toast(`投料数量不能大于计划数量`)
|
| | | return
|
| | | }
|
| | | }
|
| | | let recordList = this.materialList.map(item => {
|
| | | return {
|
| | | wstockId: item.id,
|
| | | num: item.num
|
| | | }
|
| | | })
|
| | | createMaterialStandard({
|
| | | id: this.workorderId,
|
| | | recordList
|
| | | }).then(res => {
|
| | | if (res.code === 200) {
|
| | | // Toast.success({ message: '投料成功', duration: 2000, forbidClick: true })
|
| | | // setTimeout(() => {
|
| | | // router.go(-1)
|
| | | // }, 2000) |
| | | uni.$u.toast(`投料成功`) |
| | | uni.$emit('addMaterial') |
| | | uni.navigateBack()
|
| | | }
|
| | | })
|
| | | }
|
| | | }
|
| | | }
|
| | | </script>
|
| | |
| | | width: 100%;
|
| | | position: fixed;
|
| | | bottom: 0;
|
| | | left: 0;
|
| | | padding: 0 30rpx 68rpx 30rpx;
|
| | | padding: 0 30rpx calc(env(safe-area-inset-bottom) + 20rpx);
|
| | | box-sizing: border-box;
|
| | | z-index: 999;
|
| | | background-color: #fff;
|
| | |
|
| | | .tl_footer_submit {
|
| | | width: 690rpx;
|
| | |
| | | <template>
|
| | | <view class="content p30">
|
| | | <div class="content_search">
|
| | | <v-Search @searchInput="searchInput" @submit="submit" @reset="reset" :isShow="true"
|
| | | <v-Search @searchInput="searchForm.mixParam" @submit="search" @reset="reset" :isShow="true"
|
| | | placeholder="搜索工单编码/工序名称">
|
| | | <template v-slot:content>
|
| | | <div class="Search_item">
|
| | |
| | | <div class="content_list_item" v-for="(item, i) in list" :key="i" @click="jump(item)">
|
| | | <div class="content_list_item_top">
|
| | | <div class="content_list_item_top_left">
|
| | | <span v-if="item.mmodel">{{item.mmodel.name}} | {{item.procedureName}}</span>
|
| | | <span class="f32" v-if="item.mmodel">{{item.mmodel.name}} | {{item.procedureName}}</span>
|
| | | <div class="content_list_item_top_left_tag" v-if="item.urgent">优先{{item.urgent}}</div>
|
| | | <div class="content_list_item_top_left_tag backgreen" v-if="item.type === 0">正常</div>
|
| | | <div class="content_list_item_top_left_tag backyellow" v-if="item.type === 2">返工返修</div>
|
| | |
| | | <span class="green" v-if="item.status === 7">进行中</span>
|
| | | </div>
|
| | | </div>
|
| | | <span>工单编号: {{item.code}}</span>
|
| | | <span class="f24">工单编号: {{item.code}}</span>
|
| | | <div class="content_list_item_content">
|
| | | <div class="content_list_item_content_item">
|
| | | <div class="content_list_item_content_item_label">物料编码:</div>
|
| | |
| | | </div>
|
| | | </div>
|
| | | </scroll-view>
|
| | | <u-calendar :show="isOpenDate" mode="range" @confirm="dateConfirm"></u-calendar>
|
| | | <!-- <u-calendar :show="isOpenDate" mode="range" @confirm="dateConfirm"></u-calendar> --> |
| | | <l-calendar :lunar="false" v-model="isOpenDate" @change="onConfirm" :isRange="true" activeBgColor="#305ED5" |
| | | rangeColor="#305ED5" rangeBgColor="rgba(48, 80, 213, 0.1)"></l-calendar>
|
| | | </view>
|
| | | </template>
|
| | |
|
| | |
| | | import {
|
| | | getList,
|
| | | pageCount
|
| | | } from '@/util/api/WorkOrderAPI.js'
|
| | | } from '@/util/api/WorkOrderAPI.js' |
| | | import { gsdate } from '@/util/utils.js'
|
| | | export default {
|
| | | components: {
|
| | | vSearch,
|
| | |
| | | searchForm: {
|
| | | mixParam: '',
|
| | | startDate: '',
|
| | | endDate: '',
|
| | | endDate: gsdate(new Date()),
|
| | | statusList: []
|
| | | },
|
| | | page: {
|
| | |
| | | this.pageCounts()
|
| | | this.loadData()
|
| | | },
|
| | | methods: {
|
| | | methods: { |
| | | reset() { |
| | | this.searchForm = { |
| | | mixParam: '', |
| | | startDate: '', |
| | | endDate: gsdate(new Date()), |
| | | statusList: [] |
| | | } |
| | | this.page.page = 1 |
| | | this.pageCounts() |
| | | this.loadData() |
| | | },
|
| | | loadData() {
|
| | |
|
| | | getList({
|
| | |
| | | pageCounts() {
|
| | | pageCount({
|
| | | ...this.searchForm,
|
| | | endDate: this.searchForm.endDate ? (this.searchForm.endDate + ' 23:59:59') : '',
|
| | | endDate: this.searchForm.endDate || '',
|
| | | statusList: this.searchForm.statusList.length === 0 ? this.tagList[0].id : this.searchForm
|
| | | .statusList
|
| | | }).then(res => { |
| | |
| | | this.triggered = true;
|
| | | this.page.page = 1
|
| | | this.loadData()
|
| | | }, |
| | | search() { |
| | | this.page.page = 1 |
| | | this.loadData() |
| | | },
|
| | | jump(item) { |
| | | // uni.navigateTo({ |
| | |
| | | </div>
|
| | | </div>
|
| | | <!-- v-if="info.status === 2 || info.procedureNeedcheck === 1" -->
|
| | | <template>
|
| | | <template v-if="info.status === 2 || info.procedureNeedcheck === 1">
|
| | | <div class="bh_zw"></div>
|
| | | <div class="bg_footer bg_f7">
|
| | | <div class="bg_footer_submit bg_m" v-if="typeView == 0" @click="submit">确认报工</div>
|
| | |
| | | categoryExtList,
|
| | | queryOne,
|
| | | queryList
|
| | | } from '@/util/api/PlanningAPI' |
| | | import { REGULAR } from '@/util/utils'
|
| | | } from '@/util/api/PlanningAPI'
|
| | | import {
|
| | | REGULAR
|
| | | } from '@/util/utils'
|
| | | export default {
|
| | | components: {
|
| | | workOrderInfo
|
| | |
| | | undesirableId: '',
|
| | | undesirable: '' // 不良
|
| | | },
|
| | | triggered: false, |
| | | triggered: false,
|
| | | finished: true,
|
| | | djData: [],
|
| | | cateList: [],
|
| | |
| | | this.workorderId = obj.id
|
| | | this.queryByIds()
|
| | | this.getOrocessRecords()
|
| | | this.getData() |
| | | uni.$on('spotAdd', () => { |
| | | if (this.typeView == 1) { |
| | | this.pages.page = 1 |
| | | this.pageDJs() |
| | | } |
| | | this.getData()
|
| | | uni.$on('spotAdd', () => {
|
| | | if (this.typeView == 1) {
|
| | | this.pages.page = 1
|
| | | this.pageDJs()
|
| | | }
|
| | | })
|
| | | uni.$on('addMaterial', () => {
|
| | | this.getOrocessRecords()
|
| | | })
|
| | | },
|
| | | computed: {
|
| | |
| | | },
|
| | | clickIten(index) {
|
| | | this.typeView = index
|
| | | if (this.typeView == 1) { |
| | | if (this.typeView == 1) {
|
| | | this.pages.page = 1
|
| | | this.pageDJs()
|
| | | }
|
| | |
| | | this.form.index = index
|
| | | this.form.type = item.type
|
| | | },
|
| | | submit() { |
| | | let createUnqualifiedDTOList = this.form.defective.map((item) => { |
| | | return { |
| | | categoryId: item.id, |
| | | unQualifiedNum: item.num |
| | | } |
| | | }) |
| | | let createWorkorderRecordDTO = { |
| | | workorderId: this.workorderId, |
| | | duration: this.form.duration ? this.form.duration : 0, |
| | | qualifiedNum: this.produceFrom.qualified ? this.produceFrom.qualified : 0, |
| | | unQualifiedNum: this.produceFrom.undesirable ? this.produceFrom.undesirable : 0 |
| | | } |
| | | // id: route.query.id |
| | | comfirmDoneStandard({ |
| | | createUnqualifiedDTOList, |
| | | createWorkorderRecordDTO |
| | | }).then(res => { |
| | | if (res.code === 200) { |
| | | uni.$u.toast('报工成功') |
| | | setTimeout(() => { |
| | | uni.navigateBack({ data: 2}) |
| | | }, 2000) |
| | | } |
| | | }) |
| | | submit() {
|
| | | let createUnqualifiedDTOList = this.form.defective.map((item) => {
|
| | | return {
|
| | | categoryId: item.id,
|
| | | unQualifiedNum: item.num
|
| | | }
|
| | | })
|
| | | let createWorkorderRecordDTO = {
|
| | | workorderId: this.workorderId,
|
| | | duration: this.form.duration ? this.form.duration : 0,
|
| | | qualifiedNum: this.produceFrom.qualified ? this.produceFrom.qualified : 0,
|
| | | unQualifiedNum: this.produceFrom.undesirable ? this.produceFrom.undesirable : 0
|
| | | }
|
| | | // id: route.query.id
|
| | | comfirmDoneStandard({
|
| | | createUnqualifiedDTOList,
|
| | | createWorkorderRecordDTO
|
| | | }).then(res => {
|
| | | if (res.code === 200) {
|
| | | uni.$u.toast('报工成功')
|
| | | setTimeout(() => {
|
| | | uni.navigateBack({
|
| | | data: 2
|
| | | })
|
| | | }, 2000)
|
| | | }
|
| | | })
|
| | | },
|
| | | jumpdj() {
|
| | | uni.navigateTo({
|
| | | url: `/pages_adjust/pages/spotCheck/spotCheck?id=${this.workorderId}`
|
| | | })
|
| | | }, |
| | | getLists() { |
| | | if (!this.finished) { |
| | | return |
| | | } |
| | | this.finished = false |
| | | this.pages.page += 1 |
| | | this.pageDJs() |
| | | },
|
| | | pageDJs() { |
| | | |
| | | getLists() {
|
| | | if (!this.finished) {
|
| | | return
|
| | | }
|
| | | this.finished = false
|
| | | this.pages.page += 1
|
| | | this.pageDJs()
|
| | | },
|
| | | pageDJs() {
|
| | |
|
| | | pageDJ({
|
| | | capacity: this.pages.capacity,
|
| | | page: this.pages.page,
|
| | | model: {
|
| | | workorderId: this.workorderId
|
| | | }
|
| | | }).then(res => { |
| | | let {data} = res |
| | | if (data.page == 1) { |
| | | this.djData = [] |
| | | } |
| | | this.djData.push(...data.records)
|
| | | // loading.value = false
|
| | | }).catch(err => {
|
| | | // loading.value = false
|
| | | // finished.value = true
|
| | | }) |
| | | .finally(() => { |
| | | this.finished = true |
| | | })
|
| | | capacity: this.pages.capacity,
|
| | | page: this.pages.page,
|
| | | model: {
|
| | | workorderId: this.workorderId
|
| | | }
|
| | | }).then(res => {
|
| | | let {
|
| | | data
|
| | | } = res
|
| | | if (data.page == 1) {
|
| | | this.djData = []
|
| | | }
|
| | | this.djData.push(...data.records)
|
| | | // loading.value = false
|
| | | }).catch(err => {
|
| | | // loading.value = false
|
| | | // finished.value = true
|
| | | })
|
| | | .finally(() => {
|
| | | this.finished = true
|
| | | })
|
| | | },
|
| | | dele(id) {
|
| | | deletedj(id)
|
| | |
| | | // url: ''
|
| | | url: `/pages_adjust/pages/manualFeed/manualFeed?id=${this.workorderId}`
|
| | | })
|
| | | },
|
| | | deleItem(id, type) {
|
| | | uni.showModal({
|
| | | title: '提示',
|
| | | content: '确定删除此条记录吗?',
|
| | | success: (res) => {
|
| | | if (res.confirm) {
|
| | | console.log('用户点击确定');
|
| | | deleteCT(id)
|
| | | .then(res => { |
| | | this.getOrocessRecords()
|
| | | // if (type === 'C') {
|
| | | // this.getOrocessRecordCC()
|
| | | // } else if (type === 'T') {
|
| | | // this.getOrocessRecords()
|
| | | // }
|
| | | }) |
| | | .catch(err => {})
|
| | | }
|
| | | }
|
| | | })
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | $uni-font-size-subtitle:26px; |
| | | $uni-color-paragraph: #3F536E; // 文章段落颜色 |
| | | $uni-font-size-paragraph:15px; |
| | | |
| | | .backgreen { |
| | | background: $nav-stateColor2 !important; |
| | | } |
| | | |
| | | .backyellow { |
| | | background: $nav-stateColor5 !important; |
| | | } |
| | | |
| | | .backred { |
| | | background: $nav-stateColor4 !important; |
| | | } |
| | |
| | | left: 0;
|
| | | right: 0;
|
| | | bottom: 0;
|
| | | z-index: 9999;
|
| | | z-index: 99999;
|
| | | visibility: hidden;
|
| | | transform: translate3d(0, 100%, 0);
|
| | | transform-origin: center;
|
| | |
| | | // 引入配置
|
| | | import { baseUrl } from '@/common/config'
|
| | | import { baseUrl } from '@/common/config' |
| | | console.log(baseUrl);
|
| | | // 初始化请求配置
|
| | | uni.$u.http.setConfig((defaultConfig) => {
|
| | | /* defaultConfig 为默认全局配置 */ |
| | |
| | | * @param {Object} http
|
| | | */
|
| | | module.exports = (vm) => {
|
| | | uni.$u.http.interceptors.request.use((config) => { // 可使用async await 做异步操作
|
| | | uni.$u.http.interceptors.request.use((config) => { // 可使用async await 做异步操作 |
| | | console.log(config);
|
| | | if (vm.$store.state.session) {
|
| | | config.header['Cookie'] = 'eva-auth-token=' + vm.$store.state.session
|
| | | }
|
| | |
| | | #VUE_APP_BASE_URL = 'http://192.168.0.36:10021/'
|
| | |
|
| | | #刘磊磊本地
|
| | | # VUE_APP_BASE_URL = 'http://192.168.0.18:10021/'
|
| | | VUE_APP_BASE_URL = 'http://192.168.0.18:10021/'
|
| | | # VUE_APP_BASE_URL = 'https://dmtest.ahapp.net/doumeeplant_api/' |
| | |
| | | <el-form-item label="菜单名称" prop="name" required> |
| | | <el-input v-model="form.name" placeholder="请输入菜单名称" v-trim maxlength="50"/> |
| | | </el-form-item> |
| | | <el-form-item label="访问路径" prop="path"> |
| | | <el-form-item label="h5访问路径" prop="path"> |
| | | <el-input v-model="form.path" placeholder="请输入访问路径" v-trim maxlength="200"/> |
| | | </el-form-item> |
| | | <el-form-item label="小程序访问路径" prop="pathSec"> |
| | | <el-input v-model="form.pathSec" placeholder="请输入访问路径" v-trim maxlength="200"/> |
| | | </el-form-item> |
| | | <el-form-item label="图标" prop="icon" class="form-item-icon"> |
| | | <div style="display: flex;"> |
| | |
| | | parentId: null, |
| | | name: '', |
| | | path: '', |
| | | pathSec: '', |
| | | icon: '', |
| | | fullIcon: '', |
| | | remark: '', |
| | |
| | | <template v-else>未设置</template> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="path" label="访问路径" align="center" min-width="140px"></el-table-column> |
| | | <el-table-column prop="path" label="h5访问路径" align="center" min-width="140px"></el-table-column> |
| | | <el-table-column prop="pathSec" label="小程序访问路径" align="center" min-width="140px"></el-table-column> |
| | | <el-table-column prop="remark" label="备注" align="center" min-width="120px"></el-table-column> |
| | | <el-table-column prop="createUser" label="创建人" align="center" min-width="100px"> |
| | | <template slot-scope="{row}">{{row.createUserInfo == null ? '' : row.createUserInfo.username}}</template> |