代码优化

This commit is contained in:
BianLzhaoMin 2024-08-21 17:23:45 +08:00
parent f34db1d21d
commit cf7c7eb8d6
20 changed files with 2846 additions and 2713 deletions

View File

@ -1,8 +1,8 @@
import Http from'./request'
import Http from './request'
import HttpConfig from './http'
const login = {
async codeLogin (data = {} , header = {}){
async codeLogin(data = {}, header = {}) {
return await Http.post(
HttpConfig.authPath,
HttpConfig.serviceUrl.login.code,
@ -10,7 +10,7 @@ const login = {
header
)
},
async checkCode (data = {} , header = {}){
async checkCode(data = {}, header = {}) {
return await Http.post(
HttpConfig.authPath,
HttpConfig.serviceUrl.login.checkCode,
@ -18,10 +18,10 @@ const login = {
header
)
},
async log (data = {} , header = {}){
async log(data = {}, header = {}) {
return await Http.post(
HttpConfig.authPath,
HttpConfig.serviceUrl.login.log,
HttpConfig.serviceUrl.login.log,
data,
header
)
@ -29,7 +29,7 @@ const login = {
}
const user = {
async logOut (data = {} , header = {}){
async logOut(data = {}, header = {}) {
return await Http.delete(
HttpConfig.authPath,
HttpConfig.serviceUrl.user.logOut,
@ -40,7 +40,7 @@ const user = {
}
const index = {
async noticeCont (data = {} , header = {}){
async noticeCont(data = {}, header = {}) {
return await Http.get(
HttpConfig.basePath,
HttpConfig.serviceUrl.index.noticeCont,
@ -48,7 +48,7 @@ const index = {
header
)
},
async singleNotice (data = {} , header = {}){
async singleNotice(data = {}, header = {}) {
return await Http.get(
HttpConfig.systemPath,
HttpConfig.serviceUrl.index.singleNotice,
@ -56,7 +56,7 @@ const index = {
header
)
},
async waitDo (data = {} , header = {}){
async waitDo(data = {}, header = {}) {
return await Http.get(
HttpConfig.basePath,
HttpConfig.serviceUrl.index.waitDo,
@ -64,7 +64,7 @@ const index = {
header
)
},
async keyData (data = {} , header = {}){
async keyData(data = {}, header = {}) {
return await Http.get(
HttpConfig.basePath,
HttpConfig.serviceUrl.index.keyData,
@ -72,7 +72,7 @@ const index = {
header
)
},
async getUserInfo (data = {} , header = {}){
async getUserInfo(data = {}, header = {}) {
return await Http.get(
HttpConfig.systemPath,
HttpConfig.serviceUrl.index.getUserInfo,
@ -80,7 +80,7 @@ const index = {
header
)
},
async fetchCompanyName (data = {} , header = {}){
async fetchCompanyName(data = {}, header = {}) {
return await Http.get(
HttpConfig.systemPath,
HttpConfig.serviceUrl.index.fetchCompanyName,
@ -91,7 +91,7 @@ const index = {
}
const fetchMaterial = {
async fetchMaterialList (data = {} , header = {}){
async fetchMaterialList(data = {}, header = {}) {
return await Http.get(
HttpConfig.basePath,
HttpConfig.serviceUrl.fetchMaterial.fetchMaterialList,
@ -99,7 +99,7 @@ const fetchMaterial = {
header
)
},
async getDeptList (data = {} , header = {}){
async getDeptList(data = {}, header = {}) {
return await Http.post(
HttpConfig.systemPath,
HttpConfig.serviceUrl.fetchMaterial.getDeptList,
@ -107,7 +107,7 @@ const fetchMaterial = {
header
)
},
async getProjList (data = {} , header = {}){
async getProjList(data = {}, header = {}) {
return await Http.post(
HttpConfig.systemPath,
HttpConfig.serviceUrl.fetchMaterial.getProjList,
@ -115,7 +115,7 @@ const fetchMaterial = {
header
)
},
async subCart (data = {} , header = {}){
async subCart(data = {}, header = {}) {
return await Http.post(
HttpConfig.basePath,
HttpConfig.serviceUrl.fetchMaterial.subCart,
@ -123,7 +123,7 @@ const fetchMaterial = {
header
)
},
async getDeviceDetail (data = {} , header = {}){
async getDeviceDetail(data = {}, header = {}) {
return await Http.get(
HttpConfig.basePath,
HttpConfig.serviceUrl.fetchMaterial.getDeviceDetail,
@ -131,7 +131,7 @@ const fetchMaterial = {
header
)
},
async addItemToCart (data = {} , header = {}){
async addItemToCart(data = {}, header = {}) {
return await Http.post(
HttpConfig.basePath,
HttpConfig.serviceUrl.fetchMaterial.addItemToCart,
@ -139,7 +139,7 @@ const fetchMaterial = {
header
)
},
async delCart (data = {} , header = {}){
async delCart(data = {}, header = {}) {
return await Http.delete(
HttpConfig.basePath,
HttpConfig.serviceUrl.fetchMaterial.delCart,
@ -147,7 +147,7 @@ const fetchMaterial = {
header
)
},
async getCartDetail (data = {} , header = {}){
async getCartDetail(data = {}, header = {}) {
return await Http.get(
HttpConfig.basePath,
HttpConfig.serviceUrl.fetchMaterial.getCartDetail,
@ -155,7 +155,7 @@ const fetchMaterial = {
header
)
},
async itemNumChange (data = {} , header = {}){
async itemNumChange(data = {}, header = {}) {
return await Http.post(
HttpConfig.basePath,
HttpConfig.serviceUrl.fetchMaterial.itemNumChange,
@ -166,7 +166,7 @@ const fetchMaterial = {
}
const fetchExam = {
async fetchExamList (data = {} , header = {}){
async fetchExamList(data = {}, header = {}) {
return await Http.get(
HttpConfig.basePath,
HttpConfig.serviceUrl.fetchExam.fetchExamList,
@ -174,7 +174,7 @@ const fetchExam = {
header
)
},
async subExam (data = {} , header = {}){
async subExam(data = {}, header = {}) {
return await Http.post(
HttpConfig.basePath,
HttpConfig.serviceUrl.fetchExam.subExam,
@ -182,7 +182,7 @@ const fetchExam = {
header
)
},
async subExamCq (data = {} , header = {}){
async subExamCq(data = {}, header = {}) {
return await Http.post(
HttpConfig.basePath,
HttpConfig.serviceUrl.fetchExam.subExamCq,
@ -190,7 +190,7 @@ const fetchExam = {
header
)
},
async rejectExam (data = {} , header = {}){
async rejectExam(data = {}, header = {}) {
return await Http.post(
HttpConfig.basePath,
HttpConfig.serviceUrl.fetchExam.rejectExam,
@ -198,7 +198,7 @@ const fetchExam = {
header
)
},
async rejectExamCq (data = {} , header = {}){
async rejectExamCq(data = {}, header = {}) {
return await Http.post(
HttpConfig.basePath,
HttpConfig.serviceUrl.fetchExam.rejectExamCq,
@ -206,7 +206,7 @@ const fetchExam = {
header
)
},
async fetchExamListAll (data = {} , header = {}){
async fetchExamListAll(data = {}, header = {}) {
return await Http.get(
HttpConfig.basePath,
HttpConfig.serviceUrl.fetchExam.fetchExamListAll,
@ -214,7 +214,7 @@ const fetchExam = {
header
)
},
async fetchTrueExamList (data = {} , header = {}){
async fetchTrueExamList(data = {}, header = {}) {
return await Http.get(
HttpConfig.basePath,
HttpConfig.serviceUrl.fetchExam.fetchTrueExamList,
@ -222,7 +222,7 @@ const fetchExam = {
header
)
},
async fetchTrueExamListCq (data = {} , header = {}){
async fetchTrueExamListCq(data = {}, header = {}) {
return await Http.get(
HttpConfig.basePath,
HttpConfig.serviceUrl.fetchExam.fetchTrueExamListCq,
@ -230,7 +230,7 @@ const fetchExam = {
header
)
},
async fetchDetailList (data = {} , header = {}){
async fetchDetailList(data = {}, header = {}) {
return await Http.get(
HttpConfig.basePath,
HttpConfig.serviceUrl.fetchExam.fetchDetailList,
@ -241,15 +241,15 @@ const fetchExam = {
}
const newInStore = {
async fetchNewInStoreList (data = {} , header = {}){
async fetchNewInStoreList(data = {}, header = {}) {
return await Http.get(
HttpConfig.basePath,
HttpConfig.materialPath,
HttpConfig.serviceUrl.newInStore.fetchNewInStoreList,
data,
header
)
},
async fetchNewBuyDetail (data = {} , header = {}){
async fetchNewBuyDetail(data = {}, header = {}) {
return await Http.get(
HttpConfig.materialPath,
HttpConfig.serviceUrl.newInStore.fetchNewBuyDetail,
@ -257,7 +257,7 @@ const newInStore = {
header
)
},
async subNewBuy (data = {} , header = {}){
async subNewBuy(data = {}, header = {}) {
return await Http.post(
HttpConfig.basePath,
HttpConfig.serviceUrl.newInStore.subNewBuy,
@ -268,7 +268,7 @@ const newInStore = {
}
const fetchMaterialOutStore = {
async fetchInfoByCode (data = {} , header = {}){
async fetchInfoByCode(data = {}, header = {}) {
return await Http.get(
HttpConfig.basePath,
HttpConfig.serviceUrl.fetchMaterialOutStore.fetchInfoByCode,
@ -276,7 +276,7 @@ const fetchMaterialOutStore = {
header
)
},
async subOutStore (data = {} , header = {}){
async subOutStore(data = {}, header = {}) {
return await Http.post(
HttpConfig.basePath,
HttpConfig.serviceUrl.fetchMaterialOutStore.subOutStore,
@ -284,7 +284,7 @@ const fetchMaterialOutStore = {
header
)
},
async subOutStoreArr (data = {} , header = {}){
async subOutStoreArr(data = {}, header = {}) {
return await Http.post(
HttpConfig.basePath,
HttpConfig.serviceUrl.fetchMaterialOutStore.subOutStoreArr,
@ -292,21 +292,21 @@ const fetchMaterialOutStore = {
header
)
},
async fetchInfoByQrCode(data = {}){
async fetchInfoByQrCode(data = {}) {
return await Http.get(
HttpConfig.basePath,
HttpConfig.serviceUrl.fetchMaterialOutStore.fetchInfoByQrCode,
data
)
},
async fetchSingleDetail(data = {}){
async fetchSingleDetail(data = {}) {
return await Http.get(
HttpConfig.basePath,
HttpConfig.serviceUrl.fetchMaterialOutStore.fetchSingleDetail,
data
)
},
async searchRfid(data = {}){
async searchRfid(data = {}) {
return await Http.post(
HttpConfig.basePath,
HttpConfig.serviceUrl.fetchMaterialOutStore.searchRfid,
@ -316,7 +316,7 @@ const fetchMaterialOutStore = {
}
const exitMaterial = {
async exitDeptList (data = {} , header = {}){
async exitDeptList(data = {}, header = {}) {
return await Http.post(
HttpConfig.basePath,
HttpConfig.serviceUrl.exitMaterial.exitDeptList,
@ -324,7 +324,7 @@ const exitMaterial = {
header
)
},
async exitMaterialList (data = {} , header = {}){
async exitMaterialList(data = {}, header = {}) {
return await Http.post(
HttpConfig.basePath,
HttpConfig.serviceUrl.exitMaterial.exitMaterialList,
@ -332,7 +332,7 @@ const exitMaterial = {
header
)
},
async exitMaterialDetail (data = {} , header = {}){
async exitMaterialDetail(data = {}, header = {}) {
return await Http.post(
HttpConfig.basePath,
HttpConfig.serviceUrl.exitMaterial.exitMaterialDetail,
@ -340,7 +340,7 @@ const exitMaterial = {
header
)
},
async subExitMaterial (data = {} , header = {}){
async subExitMaterial(data = {}, header = {}) {
return await Http.post(
HttpConfig.basePath,
HttpConfig.serviceUrl.exitMaterial.subExitMaterial,
@ -348,7 +348,7 @@ const exitMaterial = {
header
)
},
async delMaterial (data = {} , header = {}){
async delMaterial(data = {}, header = {}) {
return await Http.post(
HttpConfig.basePath,
HttpConfig.serviceUrl.exitMaterial.delMaterial,
@ -356,7 +356,7 @@ const exitMaterial = {
header
)
},
async newExitList (data = {} , header = {}){
async newExitList(data = {}, header = {}) {
return await Http.post(
HttpConfig.basePath,
HttpConfig.serviceUrl.exitMaterial.newExitList,
@ -364,7 +364,7 @@ const exitMaterial = {
header
)
},
async selectMaterial (data = {} , header = {}){
async selectMaterial(data = {}, header = {}) {
return await Http.post(
HttpConfig.basePath,
HttpConfig.serviceUrl.exitMaterial.selectMaterial,
@ -372,7 +372,7 @@ const exitMaterial = {
header
)
},
async ifAgreement (data = {} , header = {}){
async ifAgreement(data = {}, header = {}) {
return await Http.post(
HttpConfig.systemPath,
HttpConfig.serviceUrl.exitMaterial.ifAgreement,
@ -383,7 +383,7 @@ const exitMaterial = {
}
const exitExam = {
async exitExamList (data = {} , header = {}){
async exitExamList(data = {}, header = {}) {
return await Http.post(
HttpConfig.basePath,
HttpConfig.serviceUrl.exitExam.exitExamList,
@ -391,7 +391,7 @@ const exitExam = {
header
)
},
async exitExamDetail (data = {} , header = {}){
async exitExamDetail(data = {}, header = {}) {
return await Http.post(
HttpConfig.basePath,
HttpConfig.serviceUrl.exitExam.exitExamDetail,
@ -399,7 +399,7 @@ const exitExam = {
header
)
},
async subExitExam (data = {} , header = {}){
async subExitExam(data = {}, header = {}) {
return await Http.post(
HttpConfig.basePath,
HttpConfig.serviceUrl.exitExam.subExitExam,
@ -407,7 +407,7 @@ const exitExam = {
header
)
},
async rejectExitExam (data = {} , header = {}){
async rejectExitExam(data = {}, header = {}) {
return await Http.post(
HttpConfig.basePath,
HttpConfig.serviceUrl.exitExam.rejectExitExam,
@ -418,7 +418,7 @@ const exitExam = {
}
const fix = {
async fixList (data = {} , header = {}){
async fixList(data = {}, header = {}) {
return await Http.get(
HttpConfig.basePath,
HttpConfig.serviceUrl.fix.fixList,
@ -426,7 +426,7 @@ const fix = {
header
)
},
async fixDetail (data = {} , header = {}){
async fixDetail(data = {}, header = {}) {
return await Http.get(
HttpConfig.basePath,
HttpConfig.serviceUrl.fix.fixDetail,
@ -434,7 +434,7 @@ const fix = {
header
)
},
async fixExam (data = {} , header = {}){
async fixExam(data = {}, header = {}) {
return await Http.post(
HttpConfig.basePath,
HttpConfig.serviceUrl.fix.fixExam,
@ -442,7 +442,7 @@ const fix = {
header
)
},
async completeFix (data = {} , header = {}){
async completeFix(data = {}, header = {}) {
return await Http.post(
HttpConfig.basePath,
HttpConfig.serviceUrl.fix.completeFix,
@ -450,7 +450,7 @@ const fix = {
header
)
},
async submitFix (data = {} , header = {}){
async submitFix(data = {}, header = {}) {
return await Http.post(
HttpConfig.basePath,
HttpConfig.serviceUrl.fix.submitFix,
@ -458,7 +458,7 @@ const fix = {
header
)
},
async fixCrew (data = {} , header = {}){
async fixCrew(data = {}, header = {}) {
return await Http.get(
HttpConfig.basePath,
HttpConfig.serviceUrl.fix.fixCrew,
@ -466,7 +466,7 @@ const fix = {
header
)
},
async maList (data = {} , header = {}){
async maList(data = {}, header = {}) {
return await Http.get(
HttpConfig.basePath,
HttpConfig.serviceUrl.fix.maList,
@ -474,7 +474,7 @@ const fix = {
header
)
},
async fixFactory (data = {} , header = {}){
async fixFactory(data = {}, header = {}) {
return await Http.get(
HttpConfig.basePath,
HttpConfig.serviceUrl.fix.fixFactory,
@ -482,7 +482,7 @@ const fix = {
header
)
},
async uploadPic (data = {} , header = {}){
async uploadPic(data = {}, header = {}) {
return await Http.upload(
HttpConfig.systemPath,
HttpConfig.serviceUrl.fix.uploadPic,
@ -493,7 +493,7 @@ const fix = {
}
const repairTestInStore = {
async repairTestInStoreList (data = {} , header = {}){
async repairTestInStoreList(data = {}, header = {}) {
return await Http.post(
HttpConfig.materialPath,
HttpConfig.serviceUrl.repairTestInStore.repairTestInStoreList,
@ -501,7 +501,7 @@ const repairTestInStore = {
header
)
},
async repairTestInStoreDetail (data = {} , header = {}){
async repairTestInStoreDetail(data = {}, header = {}) {
return await Http.post(
HttpConfig.materialPath,
HttpConfig.serviceUrl.repairTestInStore.repairTestInStoreDetail,
@ -509,7 +509,7 @@ const repairTestInStore = {
header
)
},
async processOrReject (data = {} , header = {}){
async processOrReject(data = {}, header = {}) {
return await Http.post(
HttpConfig.materialPath,
HttpConfig.serviceUrl.repairTestInStore.processOrReject,
@ -520,7 +520,7 @@ const repairTestInStore = {
}
const backMaterialReceive = {
async backMaterialReceiveList (data = {} , header = {}){
async backMaterialReceiveList(data = {}, header = {}) {
return await Http.get(
HttpConfig.basePath,
HttpConfig.serviceUrl.backMaterialReceive.backMaterialReceiveList,
@ -528,7 +528,7 @@ const backMaterialReceive = {
header
)
},
async backMaterialReceiveDetail (data = {} , header = {}){
async backMaterialReceiveDetail(data = {}, header = {}) {
return await Http.post(
HttpConfig.basePath,
HttpConfig.serviceUrl.backMaterialReceive.backMaterialReceiveDetail,
@ -536,7 +536,7 @@ const backMaterialReceive = {
header
)
},
async backMaterialSetNumBack (data = {} , header = {}){
async backMaterialSetNumBack(data = {}, header = {}) {
return await Http.post(
HttpConfig.basePath,
HttpConfig.serviceUrl.backMaterialReceive.backMaterialSetNumBack,
@ -544,7 +544,7 @@ const backMaterialReceive = {
header
)
},
async backMaterialQrcodeQuery (data = {} , header = {}){
async backMaterialQrcodeQuery(data = {}, header = {}) {
return await Http.post(
HttpConfig.basePath,
HttpConfig.serviceUrl.backMaterialReceive.backMaterialQrcodeQuery,
@ -552,7 +552,7 @@ const backMaterialReceive = {
header
)
},
async backMaterialSetCodeBack (data = {} , header = {}){
async backMaterialSetCodeBack(data = {}, header = {}) {
return await Http.post(
HttpConfig.basePath,
HttpConfig.serviceUrl.backMaterialReceive.backMaterialSetCodeBack,
@ -560,8 +560,8 @@ const backMaterialReceive = {
header
)
},
async backReceiveCodeQuery (data = {} , header = {}){
async backReceiveCodeQuery(data = {}, header = {}) {
return await Http.post(
HttpConfig.basePath,
HttpConfig.serviceUrl.backMaterialReceive.backReceiveCodeQuery,
@ -569,7 +569,7 @@ const backMaterialReceive = {
header
)
},
async backReceiveEndBack (data = {} , header = {}){
async backReceiveEndBack(data = {}, header = {}) {
return await Http.post(
HttpConfig.basePath,
HttpConfig.serviceUrl.backMaterialReceive.backReceiveEndBack,
@ -577,7 +577,7 @@ const backMaterialReceive = {
header
)
},
async seeBackMaterialDetail (data = {}, header = {}){
async seeBackMaterialDetail(data = {}, header = {}) {
return await Http.post(
HttpConfig.basePath,
HttpConfig.serviceUrl.backMaterialReceive.seeBackMaterialDetail,
@ -585,7 +585,7 @@ const backMaterialReceive = {
header
)
},
async searchRfid (data = {}, header = {}){
async searchRfid(data = {}, header = {}) {
return await Http.post(
HttpConfig.basePath,
HttpConfig.serviceUrl.backMaterialReceive.searchRfid,
@ -593,7 +593,7 @@ const backMaterialReceive = {
header
)
},
async subRfid (data = {}, header = {}){
async subRfid(data = {}, header = {}) {
return await Http.post(
HttpConfig.basePath,
HttpConfig.serviceUrl.backMaterialReceive.subRfid,
@ -602,7 +602,7 @@ const backMaterialReceive = {
)
},
// fetchMaterialOutStore
async searchByCode (data = {}, header = {}){
async searchByCode(data = {}, header = {}) {
return await Http.get(
HttpConfig.basePath,
HttpConfig.serviceUrl.backMaterialReceive.searchByCode,
@ -785,7 +785,7 @@ const indexScan = {
const url = HttpConfig.systemPath
export default{
export default {
login,
index,
user,

View File

@ -19,7 +19,7 @@ class HttpConfig {
// baseUrl = "https://z.csgmall.com.cn/gl"
// baseUrl = "http://192.168.2.160:39080" // 梁超
// baseUrl = "http://192.168.2.218:39080" // 福
target = "http://192.168.2.77:39080" // 开发阶段后台ip
target = "http://192.168.0.56:21626" // 开发阶段后台ip
// #endif
// 基地址 (部署时使用 需要加 dev-api
// authPath = `${this.baseUrl}/dev-api/auth`
@ -96,7 +96,8 @@ class HttpConfig {
rejectExitExam: '/back_apply/refuse', // 拒绝单个审核
},
newInStore: {
fetchNewInStoreList: '/purchaseInput/list', // 获取新购入库列表
// fetchNewInStoreList: '/purchaseInput/list', // 获取新购入库列表
fetchNewInStoreList: '/purchaseCheckInfo/putInList', // 获取新购入库列表
fetchNewBuyDetail: '/purchaseMacode/putinDetails', // 获取新购入库详情
subNewBuy: '/purchaseInput/manageStatus', // 新购明细提交审核
},

View File

@ -1,55 +1,59 @@
<template>
<view>
<view class="search-bar">
<uni-easyinput suffixIcon="search" v-model="exitIpt" placeholder="请输入关键字" @iconClick="searchKeyword"></uni-easyinput>
</view>
<uni-swipe-action>
<uni-swipe-action-item
:right-options="options"
class="single-fetch"
v-for="(fetch, index) in fetchMaterialList"
:key="index"
@click="optionClick($event, fetch.id, fetch.modelId)"
>
<view class="fetch-upper">
<!-- {{ fetch.taskStatus }} -->
<!-- <checkbox-group
<view>
<view class="search-bar">
<uni-easyinput
suffixIcon="search"
v-model="exitIpt"
placeholder="请输入关键字"
@iconClick="searchKeyword"></uni-easyinput>
</view>
<uni-swipe-action>
<uni-swipe-action-item
:right-options="options"
class="single-fetch"
v-for="(fetch, index) in fetchMaterialList"
:key="index"
@click="optionClick($event, fetch.id, fetch.modelId)">
<view class="fetch-upper">
<!-- {{ fetch.taskStatus }} -->
<!-- <checkbox-group
v-show="fetch.taskStatus != '35'"
style="margin-right: 15rpx;"
@change="checkClick(fetch)"
>
<checkbox :checked="fetch.checked" />
</checkbox-group> -->
<view class="upper-lef">
{{ fetch.backPerson == null ? '' : fetch.backPerson.slice(0, 1) }}
</view>
<view class="upper-rig">
<h4 style="font-size: 16px;">{{ fetch.backPerson }}</h4>
<h4 style="color: #989898;">{{ fetch.unitName }}</h4>
</view>
</view>
<view
class="fetch-lower"
@click="seeDetail(fetch)"
>
<view>
<span>退料单号</span>
<h4>{{ fetch.code }}</h4>
</view>
<view>
<span>退料工程</span>
<h4>{{ fetch.lotName }}</h4>
</view>
<view>
<span>工机具类型</span>
<h4>{{ fetch.typeName }}</h4>
</view>
<view>
<span>申请日期</span>
<h4>{{ fetch.backTime }}</h4>
</view>
</view>
<!-- <view class="fetch-btns">
<view class="upper-lef">
{{
fetch.backPerson == null
? ""
: fetch.backPerson.slice(0, 1)
}}
</view>
<view class="upper-rig">
<h4 style="font-size: 16px">{{ fetch.backPerson }}</h4>
<h4 style="color: #989898">{{ fetch.unitName }}</h4>
</view>
</view>
<view class="fetch-lower" @click="seeDetail(fetch)">
<view>
<span>退料单号</span>
<h4>{{ fetch.code }}</h4>
</view>
<view>
<span>退料工程</span>
<h4>{{ fetch.lotName }}</h4>
</view>
<view>
<span>工机具类型</span>
<h4>{{ fetch.typeName }}</h4>
</view>
<view>
<span>申请日期</span>
<h4>{{ fetch.backTime }}</h4>
</view>
</view>
<!-- <view class="fetch-btns">
<view
style="background-color: #3788FF;"
@click="seeDetail(fetch.taskId)"
@ -67,15 +71,21 @@
审核
</view>
</view> -->
<view class="sticky-area">
<!-- <image src="/static/passed.png" v-show="fetch.taskStatus == '40'" mode=""></image> -->
<!-- <image src="/static/noPass.png" v-show="fetch.taskStatus == '40'" mode=""></image> -->
<image src="/static/accomplished.png" v-show="fetch.taskStatus == '40'" mode=""></image>
<image src="/static/notAccomplished.png" v-show="fetch.taskStatus != '40'" mode=""></image>
</view>
</uni-swipe-action-item>
</uni-swipe-action>
<!-- <view class="btm-sticky">
<view class="sticky-area">
<!-- <image src="/static/passed.png" v-show="fetch.taskStatus == '40'" mode=""></image> -->
<!-- <image src="/static/noPass.png" v-show="fetch.taskStatus == '40'" mode=""></image> -->
<image
src="/static/accomplished.png"
v-show="fetch.taskStatus == '40'"
mode=""></image>
<image
src="/static/notAccomplished.png"
v-show="fetch.taskStatus != '40'"
mode=""></image>
</view>
</uni-swipe-action-item>
</uni-swipe-action>
<!-- <view class="btm-sticky">
<view class="checked">
<checkbox-group @tap="checkAll" style="margin-right: 15rpx;">
<checkbox :checked="allChecked" />
@ -89,60 +99,58 @@
审核
</view>
</view> -->
</view>
</view>
</template>
<script>
import { basePath } from '../../public'
export default {
data() {
return {
allChecked: false,
fetchMaterialList: [
],
examList: [],
exitIpt: '',
options:[
{
text: '查看',
style: {
backgroundColor: '#007aff'
}
}
]
}
},
computed: {
listData: function () {
if (!this.exitIpt) {
return this.fetchMaterialList;
}
return this.fetchMaterialList.filter((item) => {
return item.backPerson.includes(this.exitIpt);
});
}
},
methods: {
optionClick (e, id, modelId) {
console.log(id);
uni.navigateTo({
url: `/pages/seeBackMaterialDetail/seeBackMaterialDetail?id=${id}&typeId=${modelId}`
})
},
seeDetail (item) {
if (item.taskStatus == 40) {
uni.showToast({
icon: 'none',
title: '退料已完成,请勿再点击!'
})
} else {
uni.navigateTo({
url: `/pages/backMaterialReceiveDetail/backMaterialReceiveDetail?id=${item.id}&taskId=${item.taskId}&taskStatus=${item.taskStatus}`
})
}
},
/* checkAll() {
import { basePath } from "../../public";
export default {
data() {
return {
allChecked: false,
fetchMaterialList: [],
examList: [],
exitIpt: "",
options: [
{
text: "查看",
style: {
backgroundColor: "#007aff",
},
},
],
};
},
computed: {
listData: function () {
if (!this.exitIpt) {
return this.fetchMaterialList;
}
return this.fetchMaterialList.filter((item) => {
return item.backPerson.includes(this.exitIpt);
});
},
},
methods: {
optionClick(e, id, modelId) {
console.log(id, modelId, "modelId");
uni.navigateTo({
url: `/pages/seeBackMaterialDetail/seeBackMaterialDetail?id=${id}&typeId=${modelId}`,
});
},
seeDetail(item) {
if (item.taskStatus == 40) {
uni.showToast({
icon: "none",
title: "退料已完成,请勿再点击!",
});
} else {
uni.navigateTo({
url: `/pages/backMaterialReceiveDetail/backMaterialReceiveDetail?id=${item.id}&taskId=${item.taskId}&taskStatus=${item.taskStatus}`,
});
}
},
/* checkAll() {
this.allChecked = !this.allChecked
if (this.allChecked) {
this.fetchMaterialList.map(item => {
@ -173,212 +181,221 @@ import { basePath } from '../../public'
}
}
}, */
toggleExam () {
let that = this
that.examList = that.fetchMaterialList.filter((item) => {
return item.checked == true
}).map((subItem) => {
return {
name: subItem['name'],
number: subItem['fetchNum']
}
})
console.log(that.examList);
},
closePopup () {
this.$refs.popup.close()
},
seeExam (name) {
console.log(name);
this.$refs.popup.open()
},
formSubmit () {
let that = this
that.$refs.examForm.validate().then(formData => {
console.log(formData);
that.$refs.popup.close()
})
},
ifPassChange (e) {
let that = this
console.log(e);
if (e == 1) {
that.rules = {
ifPass: {
rules: [
{
required: true,
errorMessage: '请选择是否通过!'
}
]
},
noPassReason: {
rules: [
{
required: true,
errorMessage: '请填写不通过原因!'
}
]
}
}
} else {
that.examFormData.noPassReason = ''
that.rules = {
ifPass: {
rules: [
{
required: true,
errorMessage: '请选择是否通过!'
}
]
}
}
}
},
getList (keyWord) {
console.log(keyWord);
let that = this
// 退
that.$api.backMaterialReceive.backMaterialReceiveList({
companyId: uni.getStorageSync('userInfo').sysUser.companyId,
flag: 0,
keyWord
}).then(res => {
console.log(res);
if (res.data.code == 200) {
if (res.data.data.length == 0) {
uni.showToast({
icon: 'none',
title: '未查询到相关数据!'
})
} else {
that.fetchMaterialList = res.data.data
console.log("fetchMaterialList",that.fetchMaterialList)
}
} else {
uni.showToast({
icon: 'none',
title: res.data.msg
})
}
}).catch(err => {
console.log(err);
})
},
searchKeyword () {
this.getList(this.exitIpt)
}
},
onShow() {
this.getList('')
}
}
toggleExam() {
let that = this;
that.examList = that.fetchMaterialList
.filter((item) => {
return item.checked == true;
})
.map((subItem) => {
return {
name: subItem["name"],
number: subItem["fetchNum"],
};
});
console.log(that.examList);
},
closePopup() {
this.$refs.popup.close();
},
seeExam(name) {
console.log(name);
this.$refs.popup.open();
},
formSubmit() {
let that = this;
that.$refs.examForm.validate().then((formData) => {
console.log(formData);
that.$refs.popup.close();
});
},
ifPassChange(e) {
let that = this;
console.log(e);
if (e == 1) {
that.rules = {
ifPass: {
rules: [
{
required: true,
errorMessage: "请选择是否通过!",
},
],
},
noPassReason: {
rules: [
{
required: true,
errorMessage: "请填写不通过原因!",
},
],
},
};
} else {
that.examFormData.noPassReason = "";
that.rules = {
ifPass: {
rules: [
{
required: true,
errorMessage: "请选择是否通过!",
},
],
},
};
}
},
getList(keyWord) {
console.log(keyWord);
let that = this;
// 退
that.$api.backMaterialReceive
.backMaterialReceiveList({
companyId:
uni.getStorageSync("userInfo").sysUser.companyId,
flag: 0,
keyWord,
})
.then((res) => {
console.log(res);
if (res.data.code == 200) {
if (res.data.data.length == 0) {
uni.showToast({
icon: "none",
title: "未查询到相关数据!",
});
} else {
that.fetchMaterialList = res.data.data;
console.log(
"fetchMaterialList",
that.fetchMaterialList
);
}
} else {
uni.showToast({
icon: "none",
title: res.data.msg,
});
}
})
.catch((err) => {
console.log(err);
});
},
searchKeyword() {
this.getList(this.exitIpt);
},
},
onShow() {
this.getList("");
},
};
</script>
<style lang="scss">
body{
background-color: #f8f8f8;
box-sizing: border-box;
padding-bottom: 10vh;
}
.search-bar{
width: 95%;
margin: 20rpx auto;
}
.single-fetch{
width: 95%;
margin: 20rpx auto;
background-color: #fff;
border-radius: 15rpx;
box-sizing: border-box;
padding: 5rpx;
position: relative;
.fetch-upper{
width: 100%;
box-sizing: border-box;
padding: 15rpx;
border-bottom: 1px solid #D7D7D7;
display: flex;
align-items: center;
.upper-lef{
width: 12%;
height: 5vh;
border-radius: 15rpx;
display: flex;
justify-content: center;
align-items: center;
background-color: #3789FD;
color: #fff;
font-size: 24px;
}
.upper-rig{
flex: 1;
box-sizing: border-box;
padding: 10rpx 20rpx;
display: flex;
flex-direction: column;
justify-content: space-around;
h4{
font-weight: normal;
font-size: 14px;
}
}
}
.fetch-lower{
width: 100%;
box-sizing: border-box;
padding: 15rpx;
view{
width: 100%;
display: flex;
align-items: center;
margin-bottom: 15rpx;
font-size: 14px;
span{
color: #9D9D9D;
padding-right: 20rpx;
}
h4{
color: #000;
font-size: 14px;
font-weight: normal;
}
}
view:last-child{
margin-bottom: 0;
}
}
.fetch-btns{
width: 100%;
box-sizing: border-box;
padding: 15rpx;
display: flex;
justify-content: flex-end;
view{
box-sizing: border-box;
padding: 8rpx 25rpx;
border-radius: 15rpx;
color: #fff;
margin-right: 15rpx;
font-size: 14px;
}
view:last-child{
margin-right: 0;
}
}
.sticky-area{
position: absolute;
top: 0;
right: 0;
width: 10vh;
height: 9vh;
image{
width: 100%;
height: 100%;
}
}
}
/* .btm-sticky{
body {
background-color: #f8f8f8;
box-sizing: border-box;
padding-bottom: 10vh;
}
.search-bar {
width: 95%;
margin: 20rpx auto;
}
.single-fetch {
width: 95%;
margin: 20rpx auto;
background-color: #fff;
border-radius: 15rpx;
box-sizing: border-box;
padding: 5rpx;
position: relative;
.fetch-upper {
width: 100%;
box-sizing: border-box;
padding: 15rpx;
border-bottom: 1px solid #d7d7d7;
display: flex;
align-items: center;
.upper-lef {
width: 12%;
height: 5vh;
border-radius: 15rpx;
display: flex;
justify-content: center;
align-items: center;
background-color: #3789fd;
color: #fff;
font-size: 24px;
}
.upper-rig {
flex: 1;
box-sizing: border-box;
padding: 10rpx 20rpx;
display: flex;
flex-direction: column;
justify-content: space-around;
h4 {
font-weight: normal;
font-size: 14px;
}
}
}
.fetch-lower {
width: 100%;
box-sizing: border-box;
padding: 15rpx;
view {
width: 100%;
display: flex;
align-items: center;
margin-bottom: 15rpx;
font-size: 14px;
span {
color: #9d9d9d;
padding-right: 20rpx;
}
h4 {
color: #000;
font-size: 14px;
font-weight: normal;
}
}
view:last-child {
margin-bottom: 0;
}
}
.fetch-btns {
width: 100%;
box-sizing: border-box;
padding: 15rpx;
display: flex;
justify-content: flex-end;
view {
box-sizing: border-box;
padding: 8rpx 25rpx;
border-radius: 15rpx;
color: #fff;
margin-right: 15rpx;
font-size: 14px;
}
view:last-child {
margin-right: 0;
}
}
.sticky-area {
position: absolute;
top: 0;
right: 0;
width: 10vh;
height: 9vh;
image {
width: 100%;
height: 100%;
}
}
}
/* .btm-sticky{
position: fixed;
bottom: 0;
left: 0;

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -548,9 +548,10 @@
})
}, */
toggleSubmit(list) {
console.log(list, "审核时的参数");
let that = this;
that.$api.fetchExam
.subExam(list)
.subExamCq(list)
.then((res) => {
console.log(res);
if (res.data.code == 200) {

View File

@ -1,81 +1,78 @@
<template>
<view>
<view
class="single-fetch"
v-for="(fetch, index) in fetchList"
:key="index"
@click="openPopup(fetch)"
>
<view>
<span>类型名称</span>
<h4>{{ fetch.typeName }}</h4>
</view>
<view>
<span>规格型号</span>
<h4>{{ fetch.typeModelName }}</h4>
</view>
<view>
<span>待出库数量</span>
<h4>{{ fetch.outNum }}</h4>
</view>
</view>
<uni-popup
ref="popup1"
type="center"
:mask-click="false"
>
<view class="popup1">
<view class="pop-top">
<h4>领料出库</h4>
<uni-icons
style="color: #AAAAAA; font-weight: bold;"
type="closeempty"
size="20"
@click="closePopup1"
>
</uni-icons>
</view>
<h5 style="width: 85%; margin: 2vh auto; font-weight: normal; text-align: center;">请选择出库方式</h5>
<view class="select-area">
<view @click="scanCode">二维码</view>
<view @click="codeOut">编码出库</view>
<view @click="rfidOut">RFID出库</view>
</view>
<!-- <view class="ipt-area">
<view>
<view
class="single-fetch"
v-for="(fetch, index) in fetchList"
:key="index"
@click="openPopup(fetch)">
<view>
<span>类型名称</span>
<h4>{{ fetch.typeName }}</h4>
</view>
<view>
<span>规格型号</span>
<h4>{{ fetch.typeModelName }}</h4>
</view>
<view>
<span>待出库数量</span>
<h4>{{ fetch.outNum }}</h4>
</view>
</view>
<uni-popup ref="popup1" type="center" :mask-click="false">
<view class="popup1">
<view class="pop-top">
<h4>领料出库</h4>
<uni-icons
style="color: #aaaaaa; font-weight: bold"
type="closeempty"
size="20"
@click="closePopup1">
</uni-icons>
</view>
<h5
style="
width: 85%;
margin: 2vh auto;
font-weight: normal;
text-align: center;
">
请选择出库方式
</h5>
<view class="select-area">
<view @click="scanCode">二维码</view>
<view @click="codeOut">编码出库</view>
<!-- <view @click="rfidOut">RFID出库</view> -->
</view>
<!-- <view class="ipt-area">
<uni-easyinput v-model="codeVal" placeholder="请输入编码"></uni-easyinput>
</view> -->
</view>
</uni-popup>
<uni-popup
ref="popup2"
type="center"
:mask-click="false"
>
<view class="popup2">
<view class="pop-top">
<h4>批量出库</h4>
<uni-icons
style="color: #AAAAAA; font-weight: bold;"
type="closeempty"
size="20"
@click="closePopup2"
>
</uni-icons>
</view>
<view class="info-area">
<view>
<h4>类型名称</h4>
<span>{{ infoList.typeName }}</span>
</view>
<view>
<h4>设备名称</h4>
<span>{{ infoList.typeModelName }}</span>
</view>
<view>
<h4>待出库数量</h4>
<span>{{ infoList.outNum }}</span>
</view>
<!-- <view>
</view>
</uni-popup>
<uni-popup ref="popup2" type="center" :mask-click="false">
<view class="popup2">
<view class="pop-top">
<h4>批量出库</h4>
<uni-icons
style="color: #aaaaaa; font-weight: bold"
type="closeempty"
size="20"
@click="closePopup2">
</uni-icons>
</view>
<view class="info-area">
<view>
<h4>类型名称</h4>
<span>{{ infoList.typeName }}</span>
</view>
<view>
<h4>设备名称</h4>
<span>{{ infoList.typeModelName }}</span>
</view>
<view>
<h4>待出库数量</h4>
<span>{{ infoList.outNum }}</span>
</view>
<!-- <view>
<h4>车牌号</h4>
<uni-number-box v-model="multiNum" @change="multiNumChange" :min="0" :max="infoList.outNum"/>
<uni-easyinput
@ -84,352 +81,353 @@
>
</uni-easyinput>
</view> -->
<view>
<h4>出库数量</h4>
<!-- <uni-number-box v-model="multiNum" @change="multiNumChange" :min="0" :max="infoList.outNum"/> -->
<uni-easyinput
placeholder="请输入出库数量"
v-model="multiNum"
type="number"
>
</uni-easyinput>
</view>
</view>
<view
class="sub-btn"
@click="multiOut"
>
批量出库
</view>
</view>
</uni-popup>
<u-loading-page :loading="showLoading" color="#000" loading-text="提交中,请稍后..."></u-loading-page>
</view>
<view>
<h4>出库数量</h4>
<!-- <uni-number-box v-model="multiNum" @change="multiNumChange" :min="0" :max="infoList.outNum"/> -->
<uni-easyinput
placeholder="请输入出库数量"
v-model="multiNum"
type="number">
</uni-easyinput>
</view>
</view>
<view class="sub-btn" @click="multiOut"> 批量出库 </view>
</view>
</uni-popup>
<u-loading-page
:loading="showLoading"
color="#000"
loading-text="提交中,请稍后..."></u-loading-page>
</view>
</template>
<script>
export default {
data() {
return {
showLoading: false,
fetchList: [
],
codeVal: '',
manageType: '',
infoList: '',
multiNum: 0,
carCode: '',
subList: {},
taskId:null,
taskStatus: '',
id: '',
rfidNum: '',
typeId: '',
transMaCode: ''
}
},
methods: {
openPopup (list) {
// if(list.outNum && list.o){
// }
this.infoList = list
this.rfidNum = list.outNum
this.typeId = list.typeId
// this.transMaCode = list.maCode
console.log(this.infoList.manageType, this.infoList);
if (this.taskStatus == 33 || this.taskStatus == 34) {
if (this.infoList.manageType == 0) {
if (this.infoList.outNum == 0) {
uni.showToast({
icon: 'none',
title: '无法再出库!'
})
} else {
this.$refs.popup1.open()
}
} else {
if (this.infoList.outNum == 0) {
uni.showToast({
icon: 'none',
title: '无法再出库!'
})
} else {
this.$refs.popup2.open()
}
}
}
},
closePopup1 () {
this.$refs.popup1.close()
},
closePopup2 () {
this.$refs.popup2.close()
},
scanCode () {
console.log(this.infoList);
this.closePopup1()
uni.scanCode({
success: (res) => {
console.log(res);
const fixedCode = res.result.split('=')[1]
console.log(fixedCode);
if (!fixedCode) {
uni.showToast({
icon: 'none',
title: '未识别到设备!'
})
} else {
uni.navigateTo({
url: `/pages/scanOutStore/scanOutStore?code=${fixedCode}&typeId=${this.infoList.typeId}&num=${this.infoList.preCountNum}&parentId=${this.infoList.parentId}`
})
}
}
})
/* uni.navigateTo({
export default {
data() {
return {
showLoading: false,
fetchList: [],
codeVal: "",
manageType: "",
infoList: "",
multiNum: 0,
carCode: "",
subList: {},
taskId: null,
taskStatus: "",
id: "",
rfidNum: "",
typeId: "",
transMaCode: "",
};
},
methods: {
openPopup(list) {
// if(list.outNum && list.o){
// }
this.infoList = list;
this.rfidNum = list.outNum;
this.typeId = list.typeId;
// this.transMaCode = list.maCode
console.log(this.infoList.manageType, this.infoList);
if (this.taskStatus == 33 || this.taskStatus == 34) {
if (this.infoList.manageType == 0) {
if (this.infoList.outNum == 0) {
uni.showToast({
icon: "none",
title: "无法再出库!",
});
} else {
this.$refs.popup1.open();
}
} else {
if (this.infoList.outNum == 0) {
uni.showToast({
icon: "none",
title: "无法再出库!",
});
} else {
this.$refs.popup2.open();
}
}
}
},
closePopup1() {
this.$refs.popup1.close();
},
closePopup2() {
this.$refs.popup2.close();
},
scanCode() {
console.log(this.infoList);
this.closePopup1();
uni.scanCode({
success: (res) => {
console.log(res);
const fixedCode = res.result.split("=")[1];
console.log(fixedCode);
if (!fixedCode) {
uni.showToast({
icon: "none",
title: "未识别到设备!",
});
} else {
uni.navigateTo({
url: `/pages/scanOutStore/scanOutStore?code=${fixedCode}&typeId=${this.infoList.typeId}&num=${this.infoList.preCountNum}&parentId=${this.infoList.parentId}`,
});
}
},
});
/* uni.navigateTo({
url: `/pages/QROut/QROut?typeId=${this.infoList.typeId}&num=${this.infoList.preCountNum}&parentId=${this.infoList.parentId}`
}) */
},
codeOut () {
this.closePopup1()
console.log(this.infoList);
uni.navigateTo({
url: `/pages/codeOutStore/codeOutStore?typeId=${this.infoList.typeId}&num=${this.infoList.preCountNum}&parentId=${this.infoList.parentId}&manageType=${this.infoList.manageType}&taskId=${this.infoList.taskId}`
})
},
rfidOut () {
this.closePopup1()
uni.navigateTo({
url: `/pages/rfidOutStore/rfidOutStore?waitOut=${this.rfidNum}&typeId=${this.typeId}&parentId=${this.infoList.parentId}`
})
},
multiOut () {
let that = this
let posiIntReg = /^\+?[1-9]\d*$/
if (!posiIntReg.test(that.multiNum)) {
uni.showToast({
icon: 'none',
title: '出库数量输入有误!'
})
} else if (that.multiNum > that.infoList.outNum) {
uni.showToast({
icon: 'none',
title: '出库数量不可大于待出库数量!'
})
} else {
that.showLoading = true
that.subList = {
id: that.infoList.id,
maId: that.infoList.maId,
manageType: that.infoList.manageType,
parentId: that.infoList.parentId,
typeId: that.infoList.typeId,
taskId: that.infoList.taskId,
// carCode: that.carCode,
outNum: that.multiNum,
companyId: uni.getStorageSync('userInfo').sysUser.companyId
}
console.log(that.subList);
that.$api.fetchMaterialOutStore.subOutStore(that.subList).then(res => {
console.log(res);
if (res.data.code == 200) {
uni.showToast({
icon: 'none',
title: '出库成功',
duration:2000,
success: () => {
that.showLoading = false
that.$refs.popup2.close()
that.init()
}
})
} else {
that.showLoading = false
uni.showToast({
icon: 'none',
title: res.data.msg
})
}
}).catch(err => {
console.log(err);
})
}
},
init(){
const that = this
console.log(that.taskId, that.id);
/* const params = {
},
codeOut() {
this.closePopup1();
console.log(this.infoList);
uni.navigateTo({
url: `/pages/codeOutStore/codeOutStore?typeId=${this.infoList.typeId}&num=${this.infoList.preCountNum}&parentId=${this.infoList.parentId}&manageType=${this.infoList.manageType}&taskId=${this.infoList.taskId}`,
});
},
rfidOut() {
this.closePopup1();
uni.navigateTo({
url: `/pages/rfidOutStore/rfidOutStore?waitOut=${this.rfidNum}&typeId=${this.typeId}&parentId=${this.infoList.parentId}`,
});
},
multiOut() {
let that = this;
let posiIntReg = /^\+?[1-9]\d*$/;
if (!posiIntReg.test(that.multiNum)) {
uni.showToast({
icon: "none",
title: "出库数量输入有误!",
});
} else if (that.multiNum > that.infoList.outNum) {
uni.showToast({
icon: "none",
title: "出库数量不可大于待出库数量!",
});
} else {
that.showLoading = true;
that.subList = {
id: that.infoList.id,
maId: that.infoList.maId,
manageType: that.infoList.manageType,
parentId: that.infoList.parentId,
typeId: that.infoList.typeId,
taskId: that.infoList.taskId,
// carCode: that.carCode,
outNum: that.multiNum,
companyId:
uni.getStorageSync("userInfo").sysUser.companyId,
};
console.log(that.subList);
that.$api.fetchMaterialOutStore
.subOutStore(that.subList)
.then((res) => {
console.log(res);
if (res.data.code == 200) {
uni.showToast({
icon: "none",
title: "出库成功",
duration: 2000,
success: () => {
that.showLoading = false;
that.$refs.popup2.close();
that.init();
},
});
} else {
that.showLoading = false;
uni.showToast({
icon: "none",
title: res.data.msg,
});
}
})
.catch((err) => {
console.log(err);
});
}
},
init() {
const that = this;
console.log(that.taskId, that.id);
/* const params = {
taskId:this.taskId
} */
// const res = await that.$api.fetchMaterialOutStore.fetchSingleDetail(params)
that.$api.fetchMaterialOutStore.fetchSingleDetail({
id: that.id,
souceBy: 1
}).then(res => {
console.log(res);
that.fetchList = []
if (res.data.code == 200) {
/* for (let i = 0; i < res.data.data.rows[0].leaseApplyInfoList.length; i++) {
// const res = await that.$api.fetchMaterialOutStore.fetchSingleDetail(params)
that.$api.fetchMaterialOutStore
.fetchSingleDetail({
id: that.id,
souceBy: 1,
})
.then((res) => {
console.log(res);
that.fetchList = [];
if (res.data.code == 200) {
/* for (let i = 0; i < res.data.data.rows[0].leaseApplyInfoList.length; i++) {
for (let k = 0; k < res.data.data.rows[0].leaseApplyInfoList[i].leaseApplyDetails.length; k++) {
that.fetchList.push(res.data.data.rows[0].leaseApplyInfoList[i].leaseApplyDetails[k])
}
} */
that.fetchList = res.data.data
console.log('获取详情 ===========================',that.fetchList);
// that.fetchList[1].manageType = 1
}
}).catch(err => {
console.log(err);
})
},
multiNumChange(val){
console.log('multiNumChange ===============',val);
}
},
onLoad(params) {
let that = this
this.taskId = params.taskId
this.taskStatus = params.taskStatus
this.id = params.id
},
onShow() {
this.init()
}
}
that.fetchList = res.data.data;
console.log(
"获取详情 ===========================",
that.fetchList
);
// that.fetchList[1].manageType = 1
}
})
.catch((err) => {
console.log(err);
});
},
multiNumChange(val) {
console.log("multiNumChange ===============", val);
},
},
onLoad(params) {
let that = this;
this.taskId = params.taskId;
this.taskStatus = params.taskStatus;
this.id = params.id;
},
onShow() {
this.init();
},
};
</script>
<style lang="scss">
.single-fetch{
width: 100%;
box-sizing: border-box;
padding: 20rpx 35rpx;
border-bottom: 1px solid #DDDDDD;
view{
display: flex;
align-items: center;
margin-bottom: 25rpx;
span{
color: #A7A7A7;
padding-right: 20rpx;
}
h4{
font-size: 14px;
font-weight: normal;
}
}
view:last-child{
margin-bottom: 0;
}
}
.btm-exam{
position: fixed;
left: 0;
bottom: 0;
width: 100%;
box-sizing: border-box;
padding: 20rpx 40rpx;
display: flex;
justify-content: flex-end;
border-top: 2px solid #F6F8FF;
.exam{
box-sizing: border-box;
padding: 10rpx 50rpx;
border-radius: 30rpx;
background-color: #3788FF;
font-size: 14px;
color: #fff;
}
}
.popup1{
width: 80vw;
height: 20vh;
background-color: #fff;
border-radius: 15rpx;
overflow: hidden;
background: linear-gradient(#D9E7FE, #fff, #fff, #fff);
.pop-top{
width: 100%;
height: 5vh;
box-sizing: border-box;
padding: 0 25rpx;
display: flex;
justify-content: space-between;
align-items: center;
}
.select-area{
width: 85%;
margin: 40rpx auto;
display: flex;
justify-content: space-around;
align-items: center;
view{
box-sizing: border-box;
font-size: 14px;
padding: 10rpx 20rpx;
border: 1px solid #D5D5D4;
border-radius: 20rpx;
}
}
.ipt-area{
width: 85%;
margin: 40rpx auto;
}
}
.popup2{
width: 80vw;
height: 60vh;
background-color: #fff;
border-radius: 15rpx;
overflow: hidden;
background: linear-gradient(#D9E7FE, #fff, #fff, #fff);
.pop-top{
width: 100%;
height: 5vh;
box-sizing: border-box;
padding: 0 25rpx;
display: flex;
justify-content: space-between;
align-items: center;
}
.info-area{
width: 85%;
margin: 30rpx auto;
display: flex;
flex-direction: column;
view{
margin-bottom: 15rpx;
display: flex;
h4{
font-weight: normal;
color: #989898;
font-size: 14px;
width: 35%;
}
span{
font-size: 14px;
}
}
}
.sub-btn{
width: 85%;
margin: 30rpx auto;
background-color: #3788FF;
color: #fff;
box-sizing: border-box;
padding: 15rpx 0;
display: flex;
justify-content: center;
align-items: center;
border-radius: 40rpx;
font-size: 14px;
}
}
.single-fetch {
width: 100%;
box-sizing: border-box;
padding: 20rpx 35rpx;
border-bottom: 1px solid #dddddd;
view {
display: flex;
align-items: center;
margin-bottom: 25rpx;
span {
color: #a7a7a7;
padding-right: 20rpx;
}
h4 {
font-size: 14px;
font-weight: normal;
}
}
view:last-child {
margin-bottom: 0;
}
}
.btm-exam {
position: fixed;
left: 0;
bottom: 0;
width: 100%;
box-sizing: border-box;
padding: 20rpx 40rpx;
display: flex;
justify-content: flex-end;
border-top: 2px solid #f6f8ff;
.exam {
box-sizing: border-box;
padding: 10rpx 50rpx;
border-radius: 30rpx;
background-color: #3788ff;
font-size: 14px;
color: #fff;
}
}
.popup1 {
width: 80vw;
height: 20vh;
background-color: #fff;
border-radius: 15rpx;
overflow: hidden;
background: linear-gradient(#d9e7fe, #fff, #fff, #fff);
.pop-top {
width: 100%;
height: 5vh;
box-sizing: border-box;
padding: 0 25rpx;
display: flex;
justify-content: space-between;
align-items: center;
}
.select-area {
width: 85%;
margin: 40rpx auto;
display: flex;
justify-content: space-around;
align-items: center;
view {
box-sizing: border-box;
font-size: 14px;
padding: 10rpx 20rpx;
border: 1px solid #d5d5d4;
border-radius: 20rpx;
}
}
.ipt-area {
width: 85%;
margin: 40rpx auto;
}
}
.popup2 {
width: 80vw;
height: 60vh;
background-color: #fff;
border-radius: 15rpx;
overflow: hidden;
background: linear-gradient(#d9e7fe, #fff, #fff, #fff);
.pop-top {
width: 100%;
height: 5vh;
box-sizing: border-box;
padding: 0 25rpx;
display: flex;
justify-content: space-between;
align-items: center;
}
.info-area {
width: 85%;
margin: 30rpx auto;
display: flex;
flex-direction: column;
view {
margin-bottom: 15rpx;
display: flex;
h4 {
font-weight: normal;
color: #989898;
font-size: 14px;
width: 35%;
}
span {
font-size: 14px;
}
}
}
.sub-btn {
width: 85%;
margin: 30rpx auto;
background-color: #3788ff;
color: #fff;
box-sizing: border-box;
padding: 15rpx 0;
display: flex;
justify-content: center;
align-items: center;
border-radius: 40rpx;
font-size: 14px;
}
}
</style>

View File

@ -5,7 +5,8 @@
<image src="/static/bg1.jpg" mode=""></image>
</view>
<view class="user-rig">
<view>你好{{ username }}</view>
<view class="user-name">你好{{ username }}</view>
<!-- <view class="">你好</view> -->
<view>欢迎使用智慧仓储装备共享平台</view>
</view>
</view>
@ -366,7 +367,7 @@
}
.upper-user {
width: 85%;
margin: 8vh auto;
margin: 6vh auto 4vh;
margin-bottom: 0;
box-sizing: border-box;
padding: 15rpx;
@ -399,8 +400,18 @@
font-size: 12px;
letter-spacing: 6rpx;
}
.user-name {
overflow: hidden;
word-break: break-all; /* break-all(允许在单词内换行。) */
text-overflow: ellipsis; /* 超出部分省略号 */
display: -webkit-box; /** 对象作为伸缩盒子模型显示 **/
-webkit-box-orient: vertical; /** 设置或检索伸缩盒对象的子元素的排列方式 **/
-webkit-line-clamp: 1; /** 显示的行数 **/
}
}
}
.sliders {
width: 85%;
height: 5vh;

View File

@ -81,7 +81,7 @@
<!-- </view> -->
<view class="total">
<view class="bill" @click="finishCart">
<text>审核</text>
<text>确认入库</text>
</view>
</view>
</view>
@ -236,7 +236,7 @@
if (that.totalGoods.length == 0) {
uni.showToast({
icon: "none",
title: "未选中审核项",
title: "当前没有可入库机具",
});
} else {
const ifManage = that.totalGoods.every(
@ -263,7 +263,7 @@
} else {
uni.showToast({
icon: "none",
title: "选中项中存在未编码的机具,无法审核",
title: "选中项中存在未编码的机具,无法入库",
});
}
}

View File

@ -1,54 +1,57 @@
<template>
<view>
<view
class="single-fetch"
v-for="(fetch, index) in fetchMaterialList"
:key="index"
@click="seeDetail(fetch.taskId, fetch.taskStatus)"
>
<view class="fetch-upper">
<!-- <checkbox-group
<view>
<view
class="single-fetch"
v-for="(fetch, index) in fetchMaterialList"
:key="index"
@click="seeDetail(fetch.taskId, fetch.taskStatus)">
<view class="fetch-upper">
<!-- <checkbox-group
v-show="fetch.status == '2'"
style="margin-right: 15rpx;"
@change="checkClick(fetch)"
>
<checkbox :checked="fetch.checked" />
</checkbox-group> -->
<view class="upper-lef">
<!-- {{ fetch.purchaserName.slice(0, 1) }} -->
{{ fetch.purchaserName == null ? '' : fetch.purchaserName.slice(0, 1) }}
</view>
<view class="upper-rig">
<h4 style="font-size: 16px;">{{ fetch.purchaserName }}</h4>
</view>
</view>
<view class="fetch-lower" >
<view>
<span>采购单号</span>
<h4>{{ fetch.code }}</h4>
</view>
<view>
<span>工机具类型</span>
<h4>{{ fetch.purchasingTypeName }}</h4>
</view>
<view>
<span>采购日期</span>
<h4>{{ fetch.purchaseTime }}</h4>
</view>
<view>
<span>到货日期</span>
<h4>{{ fetch.arrivalTime }}</h4>
</view>
<!-- <view>
<view class="upper-lef">
<!-- {{ fetch.purchaserName.slice(0, 1) }} -->
{{
fetch.purchaserName == null
? ""
: fetch.purchaserName.slice(0, 1)
}}
</view>
<view class="upper-rig">
<h4 style="font-size: 16px">{{ fetch.purchaserName }}</h4>
</view>
</view>
<view class="fetch-lower">
<view>
<span>采购单号</span>
<h4>{{ fetch.code }}</h4>
</view>
<view>
<span>工机具类型</span>
<h4>{{ fetch.purchasingTypeName }}</h4>
</view>
<view>
<span>采购日期</span>
<h4>{{ fetch.purchaseTime }}</h4>
</view>
<view>
<span>到货日期</span>
<h4>{{ fetch.arrivalTime }}</h4>
</view>
<!-- <view>
<span>发布人员</span>
<h4>{{ fetch.createBy }}</h4>
</view> -->
<view>
<span>发布时间</span>
<h4>{{ fetch.createTime }}</h4>
</view>
</view>
<!-- <view class="fetch-btns">
<view>
<span>发布时间</span>
<h4>{{ fetch.createTime }}</h4>
</view>
</view>
<!-- <view class="fetch-btns">
<view style="background-color: #3788FF;" >
<uni-icons style="color: #fff;" type="eye" size="36"></uni-icons>
查看
@ -66,21 +69,21 @@
入库
</view>
</view> -->
<view class="sticky-area">
<h4
v-show="fetch.taskStatus == '26' || fetch.taskStatus == '105'"
>
待审核
</h4>
<h4
v-show="fetch.taskStatus == '28'"
style="border: 1px solid #27D870; color: #27D870;"
>
已审核
</h4>
</view>
</view>
<!-- <view class="btm-sticky">
<view class="sticky-area">
<h4
v-show="
fetch.taskStatus == '26' || fetch.taskStatus == '105'
">
待审核
</h4>
<h4
v-show="fetch.taskStatus == '28'"
style="border: 1px solid #27d870; color: #27d870">
已审核
</h4>
</view>
</view>
<!-- <view class="btm-sticky">
<view class="checked">
<checkbox-group @tap="checkAll" style="margin-right: 15rpx;">
<checkbox :checked="allChecked" />
@ -94,313 +97,326 @@
审核
</view>
</view> -->
<uni-popup
ref="popup"
type="center"
:mask-click="false"
>
<view class="popup">
<view class="pop-top">
<h4>审批</h4>
<uni-icons
style="color: #AAAAAA; font-weight: bold;"
type="closeempty"
size="32"
@click="closePopup"
>
</uni-icons>
</view>
<view class="select-area">
<uni-forms ref="examForm" :modelValue="examFormData" :rules="rules" label-position="top">
<uni-forms-item name="ifPass" required label="是否通过" label-width="150">
<uni-data-select
v-model="examFormData.ifPass"
:localdata="ifPassRange"
:clear="false"
></uni-data-select>
</uni-forms-item>
<uni-forms-item name="noPassReason" label="不通过原因" label-width="150">
<uni-easyinput type="textarea" v-model="examFormData.noPassReason" placeholder="请输入内容"></uni-easyinput>
</uni-forms-item>
<button class="submit-btn" @click="formSubmit">确认</button>
</uni-forms>
</view>
</view>
</uni-popup>
</view>
<uni-popup ref="popup" type="center" :mask-click="false">
<view class="popup">
<view class="pop-top">
<h4>审批</h4>
<uni-icons
style="color: #aaaaaa; font-weight: bold"
type="closeempty"
size="32"
@click="closePopup">
</uni-icons>
</view>
<view class="select-area">
<uni-forms
ref="examForm"
:modelValue="examFormData"
:rules="rules"
label-position="top">
<uni-forms-item
name="ifPass"
required
label="是否通过"
label-width="150">
<uni-data-select
v-model="examFormData.ifPass"
:localdata="ifPassRange"
:clear="false"></uni-data-select>
</uni-forms-item>
<uni-forms-item
name="noPassReason"
label="不通过原因"
label-width="150">
<uni-easyinput
type="textarea"
v-model="examFormData.noPassReason"
placeholder="请输入内容"></uni-easyinput>
</uni-forms-item>
<button class="submit-btn" @click="formSubmit">
确认
</button>
</uni-forms>
</view>
</view>
</uni-popup>
</view>
</template>
<script>
export default {
data() {
return {
allChecked: false,
examFormData: {
ifPass: '',
noPassReason: ''
},
ifPassRange: [
{ text: '是', value: '0' },
{ text: '否', value: '1' }
],
rules: {
ifPass: {
rules: [
{
required: true,
errorMessage: '请选择是否通过!'
}
]
}
},
fetchMaterialList: [
],
examList: []
}
},
methods: {
seeDetail (taskId, taskStatus) {
// if (taskStatus != 28) {
uni.navigateTo({
url: `/pages/newBuyDetail/newBuyDetail?taskId=${taskId}`
})
// }
},
checkAll() {
this.allChecked = !this.allChecked
if (this.allChecked) {
this.fetchMaterialList.map(item => {
if (item.checked == false) {
item.checked = true
}
})
} else {
this.fetchMaterialList.map(item => {
if (item.checked == true) {
item.checked = false
}
})
}
},
checkClick(item) {
item.checked = !item.checked
if (!item.checked) {
this.allChecked = false
} else {
const goods = this.fetchMaterialList.every(item => {
return item.checked === true
})
if (goods) {
this.allChecked = true
} else {
this.allChecked = false
}
}
},
toggleExam () {
let that = this
that.examList = that.fetchMaterialList.filter((item) => {
return item.checked == true
}).map((subItem) => {
return {
name: subItem['name']
}
})
console.log(that.examList);
},
closePopup () {
this.$refs.popup.close()
},
seeExam (name) {
console.log(name);
this.$refs.popup.open()
},
formSubmit () {
let that = this
that.$refs.examForm.validate().then(formData => {
console.log(formData);
that.$refs.popup.close()
})
}
},
onShow() {
let that = this
//
that.$api.newInStore.fetchNewInStoreList().then(res => {
console.log(res);
if (res.data.code == 200) {
that.fetchMaterialList = res.data.data
} else {
uni.showToast({
icon: 'none',
title: res.data.msg
})
}
}).catch(err => {
console.log(err);
})
}
}
export default {
data() {
return {
allChecked: false,
examFormData: {
ifPass: "",
noPassReason: "",
},
ifPassRange: [
{ text: "是", value: "0" },
{ text: "否", value: "1" },
],
rules: {
ifPass: {
rules: [
{
required: true,
errorMessage: "请选择是否通过!",
},
],
},
},
fetchMaterialList: [],
examList: [],
};
},
methods: {
seeDetail(taskId, taskStatus) {
// if (taskStatus != 28) {
uni.navigateTo({
url: `/pages/newBuyDetail/newBuyDetail?taskId=${taskId}`,
});
// }
},
checkAll() {
this.allChecked = !this.allChecked;
if (this.allChecked) {
this.fetchMaterialList.map((item) => {
if (item.checked == false) {
item.checked = true;
}
});
} else {
this.fetchMaterialList.map((item) => {
if (item.checked == true) {
item.checked = false;
}
});
}
},
checkClick(item) {
item.checked = !item.checked;
if (!item.checked) {
this.allChecked = false;
} else {
const goods = this.fetchMaterialList.every((item) => {
return item.checked === true;
});
if (goods) {
this.allChecked = true;
} else {
this.allChecked = false;
}
}
},
toggleExam() {
let that = this;
that.examList = that.fetchMaterialList
.filter((item) => {
return item.checked == true;
})
.map((subItem) => {
return {
name: subItem["name"],
};
});
console.log(that.examList);
},
closePopup() {
this.$refs.popup.close();
},
seeExam(name) {
console.log(name);
this.$refs.popup.open();
},
formSubmit() {
let that = this;
that.$refs.examForm.validate().then((formData) => {
console.log(formData);
that.$refs.popup.close();
});
},
},
onShow() {
let that = this;
//
that.$api.newInStore
.fetchNewInStoreList({ pageNum: 1, pageSize: 9999 })
.then((res) => {
console.log(res);
if (res.data.code == 200) {
that.fetchMaterialList = res.data.rows;
} else {
uni.showToast({
icon: "none",
title: res.data.msg,
});
}
})
.catch((err) => {
console.log(err);
});
},
};
</script>
<style lang="scss">
body{
background-color: #f8f8f8;
box-sizing: border-box;
padding-bottom: 10vh;
}
.single-fetch{
width: 95%;
margin: 20rpx auto;
background-color: #fff;
border-radius: 15rpx;
box-sizing: border-box;
padding: 15rpx;
position: relative;
.fetch-upper{
width: 100%;
box-sizing: border-box;
padding: 15rpx;
border-bottom: 1px solid #D7D7D7;
display: flex;
align-items: center;
.upper-lef{
width: 12%;
height: 5vh;
border-radius: 15rpx;
display: flex;
justify-content: center;
align-items: center;
font-size: 24px;
background-color: #3788FF;
color: #fff;
}
.upper-rig{
flex: 1;
box-sizing: border-box;
padding: 10rpx 20rpx;
display: flex;
flex-direction: column;
justify-content: space-around;
h4{
font-weight: normal;
font-size: 14px;
}
}
}
.fetch-lower{
width: 100%;
box-sizing: border-box;
padding: 15rpx;
// border-bottom: 1px solid #D7D7D7;
view{
width: 100%;
display: flex;
align-items: center;
margin-bottom: 15rpx;
font-size: 14px;
span{
color: #9D9D9D;
padding-right: 20rpx;
}
h4{
color: #000;
font-size: 14px;
font-weight: normal;
}
}
view:last-child{
margin-bottom: 0;
}
}
.fetch-btns{
width: 100%;
box-sizing: border-box;
padding: 15rpx;
display: flex;
justify-content: flex-end;
view{
box-sizing: border-box;
padding: 8rpx 25rpx;
border-radius: 15rpx;
color: #fff;
margin-right: 15rpx;
font-size: 14px;
}
view:last-child{
margin-right: 0;
}
}
.sticky-area{
position: absolute;
top: 20rpx;
right: 20rpx;
/* width: 11vh;
body {
background-color: #f8f8f8;
box-sizing: border-box;
padding-bottom: 10vh;
}
.single-fetch {
width: 95%;
margin: 20rpx auto;
background-color: #fff;
border-radius: 15rpx;
box-sizing: border-box;
padding: 15rpx;
position: relative;
.fetch-upper {
width: 100%;
box-sizing: border-box;
padding: 15rpx;
border-bottom: 1px solid #d7d7d7;
display: flex;
align-items: center;
.upper-lef {
width: 12%;
height: 5vh;
border-radius: 15rpx;
display: flex;
justify-content: center;
align-items: center;
font-size: 24px;
background-color: #3788ff;
color: #fff;
}
.upper-rig {
flex: 1;
box-sizing: border-box;
padding: 10rpx 20rpx;
display: flex;
flex-direction: column;
justify-content: space-around;
h4 {
font-weight: normal;
font-size: 14px;
}
}
}
.fetch-lower {
width: 100%;
box-sizing: border-box;
padding: 15rpx;
// border-bottom: 1px solid #D7D7D7;
view {
width: 100%;
display: flex;
align-items: center;
margin-bottom: 15rpx;
font-size: 14px;
span {
color: #9d9d9d;
padding-right: 20rpx;
}
h4 {
color: #000;
font-size: 14px;
font-weight: normal;
}
}
view:last-child {
margin-bottom: 0;
}
}
.fetch-btns {
width: 100%;
box-sizing: border-box;
padding: 15rpx;
display: flex;
justify-content: flex-end;
view {
box-sizing: border-box;
padding: 8rpx 25rpx;
border-radius: 15rpx;
color: #fff;
margin-right: 15rpx;
font-size: 14px;
}
view:last-child {
margin-right: 0;
}
}
.sticky-area {
position: absolute;
top: 20rpx;
right: 20rpx;
/* width: 11vh;
height: 10vh;
image{
width: 100%;
height: 100%;
} */
h4{
box-sizing: border-box;
padding: 8rpx 20rpx;
border-radius: 15rpx;
font-size: 14px;
font-weight: normal;
background-color: #fff;
border: 1px solid #3788FF;
color: #3788FF;
}
}
}
.btm-sticky{
position: fixed;
bottom: 0;
left: 0;
width: 100%;
box-sizing: border-box;
padding: 15rpx 30rpx;
background-color: #fff;
display: flex;
justify-content: space-between;
align-items: center;
.checked{
display: flex;
align-items: center;
}
.exam{
box-sizing: border-box;
padding: 10rpx 50rpx;
border-radius: 30rpx;
background-color: #3788FF;
font-size: 14px;
color: #fff;
}
}
.popup{
width: 80vw;
height: 60vh;
background-color: #fff;
border-radius: 15rpx;
overflow: hidden;
background: linear-gradient(#D9E7FE, #fff, #fff, #fff);
.pop-top{
width: 100%;
height: 5vh;
box-sizing: border-box;
padding: 0 25rpx;
display: flex;
justify-content: space-between;
align-items: center;
}
.select-area{
width: 85%;
margin: 40rpx auto;
.submit-btn{
background-color: #409EFF;
color: #fff;
}
}
}
h4 {
box-sizing: border-box;
padding: 8rpx 20rpx;
border-radius: 15rpx;
font-size: 14px;
font-weight: normal;
background-color: #fff;
border: 1px solid #3788ff;
color: #3788ff;
}
}
}
.btm-sticky {
position: fixed;
bottom: 0;
left: 0;
width: 100%;
box-sizing: border-box;
padding: 15rpx 30rpx;
background-color: #fff;
display: flex;
justify-content: space-between;
align-items: center;
.checked {
display: flex;
align-items: center;
}
.exam {
box-sizing: border-box;
padding: 10rpx 50rpx;
border-radius: 30rpx;
background-color: #3788ff;
font-size: 14px;
color: #fff;
}
}
.popup {
width: 80vw;
height: 60vh;
background-color: #fff;
border-radius: 15rpx;
overflow: hidden;
background: linear-gradient(#d9e7fe, #fff, #fff, #fff);
.pop-top {
width: 100%;
height: 5vh;
box-sizing: border-box;
padding: 0 25rpx;
display: flex;
justify-content: space-between;
align-items: center;
}
.select-area {
width: 85%;
margin: 40rpx auto;
.submit-btn {
background-color: #409eff;
color: #fff;
}
}
}
</style>

View File

@ -1,108 +1,108 @@
<template>
<view>
<view
class="single-detail"
v-for="(detail, index) in detailList"
:key="index"
>
<view>
<h4>序号</h4>
<span>{{ index + 1 }}</span>
</view>
<view>
<h4>机具名称</h4>
<span>{{ detail.typeName }}</span>
</view>
<view>
<h4>规格型号</h4>
<span>{{ detail.typeCode }}</span>
</view>
<view>
<h4>退料数量</h4>
<span>{{ detail.backNum }}</span>
</view>
<view>
<h4>机具编号</h4>
<span>{{ detail.maCode }}</span>
</view>
<view>
<h4>退料时间</h4>
<span>{{ detail.backTime }}</span>
</view>
<view>
<h4>接收状态</h4>
<span>{{ detail.backStatus }}</span>
</view>
</view>
</view>
<view>
<view
class="single-detail"
v-for="(detail, index) in detailList"
:key="index">
<view>
<h4>序号</h4>
<span>{{ index + 1 }}</span>
</view>
<view>
<h4>机具名称</h4>
<span>{{ detail.typeName }}</span>
</view>
<view>
<h4>规格型号</h4>
<span>{{ detail.typeCode }}</span>
</view>
<view>
<h4>退料数量</h4>
<span>{{ detail.backNum }}</span>
</view>
<view>
<h4>机具编号</h4>
<span>{{ detail.maCode }}</span>
</view>
<view>
<h4>退料时间</h4>
<span>{{ detail.backTime }}</span>
</view>
<view>
<h4>接收状态</h4>
<span>{{ detail.backStatus }}</span>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
detailList: []
}
},
methods: {
},
onLoad(params) {
let that = this
console.log(params.id, params.typeId);
// 退
that.$api.backMaterialReceive.seeBackMaterialDetail({
parentId: params.id
}).then(res => {
console.log(res);
if (res.data.code == 200) {
for (let i = 0; i < res.data.data.length; i++) {
switch (res.data.data[i].backStatus) {
case '1':
res.data.data[i].backStatus = '合格'
break;
case '2':
res.data.data[i].backStatus = '维修'
break;
case '3':
res.data.data[i].backStatus = '待报废'
break;
}
if (res.data.data[i].maCode == null) {
res.data.data[i].maCode = '暂无'
}
}
that.detailList = res.data.data
}
}).catch(err => {
console.log(err);
})
}
}
export default {
data() {
return {
detailList: [],
};
},
methods: {},
onLoad(params) {
let that = this;
console.log(params.id, params.typeId);
// 退
that.$api.backMaterialReceive
.seeBackMaterialDetail({
parentId: params.id,
})
.then((res) => {
console.log(res, "退料明细查看");
if (res.data.code == 200) {
for (let i = 0; i < res.data.data.length; i++) {
switch (res.data.data[i].backStatus) {
case "1":
res.data.data[i].backStatus = "合格";
break;
case "2":
res.data.data[i].backStatus = "维修";
break;
case "3":
res.data.data[i].backStatus = "待报废";
break;
}
if (res.data.data[i].maCode == null) {
res.data.data[i].maCode = "暂无";
}
}
that.detailList = res.data.data;
}
})
.catch((err) => {
console.log(err);
});
},
};
</script>
<style lang="scss">
.single-detail{
width: 100%;
box-sizing: border-box;
padding: 25rpx;
border-bottom: 1px solid #989898;
view{
width: 100%;
margin-bottom: 20rpx;
display: flex;
align-items: center;
h4{
width: 30%;
display: flex;
align-items: center;
font-weight: normal;
font-size: 16px;
color: #8D94A2;
}
span{
font-size: 16px;
}
}
}
.single-detail {
width: 100%;
box-sizing: border-box;
padding: 25rpx;
border-bottom: 1px solid #989898;
view {
width: 100%;
margin-bottom: 20rpx;
display: flex;
align-items: center;
h4 {
width: 30%;
display: flex;
align-items: center;
font-weight: normal;
font-size: 16px;
color: #8d94a2;
}
span {
font-size: 16px;
}
}
}
</style>

Binary file not shown.

View File

@ -1 +1 @@
https://app.liuyingyong.cn/build/download/859056e0-5def-11ef-ab2a-6d88694bee30
https://app.liuyingyong.cn/build/download/5ea5fa10-5eb7-11ef-a37e-dbd0aa17c117

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long