页面需求开发

test
zhangdi 1 year ago
parent 1c059abf6e
commit 39d12797ca
  1. 16
      api/api.js
  2. 20
      common/betone_components/betone-list.vue
  3. 28
      pages.json
  4. 2
      pages/home/index.vue
  5. 326
      pages/inspection/records.vue
  6. 1
      pages/register/index.vue
  7. 78
      pages/submission/materialSelect.vue
  8. 476
      pages/submission/recordsdetails.vue
  9. BIN
      static/images/submit/wuliao.png
  10. 2
      uni_modules/uview-ui/components/u-number-box/u-number-box.vue

@ -66,8 +66,22 @@ const install = (Vue, vm) => {
isparams: false
})
// 客服派单接口
// 获取物料列表数据 goods/list
let getGoodsList = (params) => http.get('/goods/list', params , {
authorization: false,
isparams: false
})
// 巡检计划列表 /
let getDictionaryList = (params) => http.get('/blade-system/dict/dictionary?code=flow', params , {
authorization: false,
isparams: false
})
// 将各个定义的接口名称,统一放进对象挂载到vm.$u.api(因为vm就是this,也即this.$u.api)下
vm.$u.api = { getTenantInfo, login, logout, register, getworkbench, getLoginRecords, getEditRecords, subEditRecords, getChildList, getDeviceList,workOrderSave,getWorkOrderRecords,getBreakdownInfo,workOrderupdate,evaluateSign,getRepairPersons };
vm.$u.api = { getTenantInfo, login, logout, register, getworkbench, getLoginRecords, getEditRecords, subEditRecords, getChildList, getDeviceList,workOrderSave,getWorkOrderRecords,getBreakdownInfo,workOrderupdate,evaluateSign,getRepairPersons,getGoodsList,getDictionaryList };
}
export default {

@ -40,13 +40,13 @@
@click.stop="goPage(item, 'breakdownView')">查看</u-button>
<!-- 接单 -->
<block v-if="item.status == 0">
<block v-if="item.status == 0&&dataTypes==1">
<u-button size="mini" :plain="true" style="margin-right: 32rpx"
@click.stop="sendOrders()" type="primary">派单</u-button>
</block>
<block v-if="item.status == 0 && dataTypes == 4">
<u-button size="mini" :plain="true" style="margin-right: 32rpx"
type="primary">接单确认</u-button>
type="primary" @click="orderConfirm(item)">接单确认</u-button>
</block>
<block v-if="item.status == 2&&dataTypes==4">
<u-button size="mini" :plain="true" style="margin-right: 32rpx"
@ -60,7 +60,7 @@
type="primary" @click="goPage(item, 'breakdownUpdate')">修改</u-button>
</block>
<!-- 待维修 -- 查看位置-->
<block v-if="dataTypes==1&&(item.status == 1 || item.status == 2 || item.status == 3)">
<block v-if="(dataTypes==1)&&(item.status == 1 || item.status == 2 || item.status == 3)">
<u-button size="mini" :plain="true" style="margin-right: 32rpx" :hair-line="true"
type="primary">查看位置</u-button>
</block>
@ -80,10 +80,11 @@
<betone-loading ref="BetLoading" />
<!-- 派单弹框 -- 接单按钮 -->
<!-- 派单弹框 选择维修人员 -->
<u-select v-model="sendOrdersShow" :list="sendOrdersList" @confirm="sendOrdersConfirm"
:isShowsearch="true" value-name="id" title="选择维修人员"></u-select>
</view>
</template>
@ -166,7 +167,7 @@ export default {
size: this.page.pageSize, //
dataType: this.dataTypes,//
// ...this.searchInfo
reportUnit: this.searchInfo.reportUnit
// reportUnit: this.searchInfo.reportUnit
}
this.$u.api.getWorkOrderRecords(query).then(res => {
@ -251,7 +252,12 @@ export default {
//
sendOrdersConfirm(e) {
console.log(44444,e);
//
//
// {"id":"1857232935845892097","reportUnit":"","maintenanceTeam":"1847218701580435458","dispatchTime":"2024-11-15 00:00:00","planCompleteTime":"","repairPerson":null,"status":1,"remark":""}
},
//
orderConfirm(row){
},
//

@ -81,20 +81,6 @@
}
}
},
{
"path": "pages/submission/materialSelect",
"style": {
"navigationBarTitleText": "物料选择",
"enablePullDownRefresh": false,
"navigationBarTextStyle": "black",
"navigationBarBackgroundColor": "rgba(248,248,248,1)",
"app-plus": {
"titleNView": {
}
}
}
},
{
"path": "pages/submission/evaluate",
"style": {
@ -136,6 +122,20 @@
"navigationStyle": "custom",
"navigationBarTextStyle": "white"
}
},
{
"path": "pages/inspection/records",
"style": {
"navigationBarTitleText": "巡检计划",
"enablePullDownRefresh": false,
"navigationBarTextStyle": "black",
"navigationBarBackgroundColor": "rgba(248,248,248,1)",
"app-plus": {
"titleNView": {
}
}
}
}
],
"globalStyle": {

@ -53,7 +53,7 @@ export default {
name: "实验室巡检",
img: require("@/static/images/home/lab_xj.png"),
num: 10,
pagePath: ''
pagePath: '/pages/inspection/records'
},
{
name: "报送记录",

@ -0,0 +1,326 @@
<template>
<view class="page-css">
<view class="page-search-top">
<betone-new-input v-model="searchInfo.requirementCode" placeholder='搜索巡检单单号' icon="search"
style="margin-bottom: 32rpx" @changevalue="searchData()" />
<u-tabs :list="tabList" :is-scroll="false" :current="current" @change="changeTab"
bg-color="rgba(248, 248, 248, 1)"></u-tabs>
</view>
<view class="order-box">
<view class="order-item" v-for="(item, index) in orderData" :key="index" @click="goPage(item, 'details')">
<view class="item-top">
<view class="item-left">
<text class="item-orderNo">{{ item.unitName }}</text>
<text class="item-time"> 单号{{ item.taskNo }}</text>
</view>
<view class="item-right">
<u-tag :text="statusName(item.status)" type="success" mode="dark" shape="circle"
:bg-color="tagColor[statusName(item.status)]" />
</view>
</view>
<view class="item-con">
<view class="con-left">
<image src="@/static/images/pic-default.png" alt="" />
</view>
<view class="con-right">
<text class="con-title">提报类型{{ item.faultType }}</text>
<view class="con-content">
<text>{{ item.faultDescribe }}</text>
</view>
<view class="con-btn">
</view>
</view>
</view>
</view>
</view>
<betone-loading ref="BetLoading" />
</view>
</template>
<script>
export default {
props: {
},
data() {
return {
searchInfo: {
requirementCode: "",
type: '',//
},
tabList: [
{
name: "全部",
key: "9999",
},
{
name: "待提报",
key: "-1",
},
{
name: "维修中",
key: "1,2,3",
},
{
name: "已完成",
key: "4,5,6",
},
],
tagColor: {
维修中: "#3A62D7",
待确认: "#81B337",
待维修: "#3A62D7",
待提报: "#81B337",
已完成: "#CECECE",
待维修: '#E99D42'
},
current: 0,
orderData: [],
};
},
computed: {
dataTypes() {
return this.$store.state.dataType
},
},
mounted() {
this.$nextTick(() => {
this.getRecordsList()
});
},
methods: {
//
getRecordsList() {
this.$refs.BetLoading.show();
this.$u.api.getDictionaryList().then(res => {
if (res.code == 200) {
this.orderData = res.data;
this.$refs.BetLoading.hide();
}
}).catch(err => {
})
},
//
searchData() {
if (this.dataTypes != 1) {
//
this.searchInfo.reportUnit = this.searchInfo.requirementCode
} else {
this.searchInfo.reportUnit = ''
}
this.isNomore = false
this.page.currentPage = 1;
this.getRecordsList()
},
// tab
changeTab(index) {
this.current = index;
this.searchInfo.type = this.tabList[index].key == '9999' ? '' : this.tabList[index].key
this.isNomore = false
this.page.currentPage = 1;
this.getRecordsList()
},
//
statusName(item) {
if (item == -1) {
return '待提报'
}
if (item == 0) {
return '待接单'
}
if (item == 1 || item == 2 || item == 3) {
return '待维修'
}
if (item == 4 || item == 5 || item == 6) {
return '已完成'
}
},
//
goPage(item, type) {
if (type == 'details') {
uni.navigateTo({
url: "/pages/submission/recordsdetails?id=" + item.id,
});
}
if (type == 'breakdownView') {
let param = {
id: item.id,
type: type
}
uni.navigateTo({
url: `/pages/submission/submissionDetails${this.$u.queryParams(param)}`,
});
}
if (type == 'breakdownUpdate') {
let param = {
id: item.id,
type: type
}
uni.navigateTo({
url: `/pages/submission/submissionDetails${this.$u.queryParams(param)}`,
});
}
if (type == 'evaluate') {
let param = {
id: item.id,
}
uni.navigateTo({
url: `/pages/submission/evaluate${this.$u.queryParams(param)}`,
});
}
},
},
};
</script>
<style lang="scss" scoped>
.page-css {
padding: 0;
.page-search-top {
height: 210rpx;
background-color: rgba(248, 248, 248, 1);
padding: 0 40rpx 0;
}
.order-box {
margin-top: 20rpx;
.order-item {
height: 414rpx;
margin: 0 24rpx 20rpx;
border-radius: 20rpx;
background: #fff;
display: flex;
flex-direction: column;
.item-top {
height: 114rpx;
border-bottom: 1px solid rgba(239, 239, 239, 1);
display: flex;
flex-direction: row;
width: 100%;
.item-left {
flex: 1;
text {
display: block;
}
.item-orderNo {
color: rgba(51, 51, 51, 1);
font-size: 28rpx;
padding: 12rpx 0 0 26rpx;
}
.item-time {
color: rgba(190, 190, 190, 1);
font-size: 24rpx;
padding: 12rpx 0 0 26rpx;
}
}
.item-right {
width: 132rpx;
height: 48rpx;
margin: 36rpx 24rpx 0 0;
}
}
.item-con {
flex: 1;
display: flex;
flex-direction: row;
.con-left {
width: 150rpx;
height: 150rpx;
margin: 24rpx 28rpx 0 28rpx;
image {
width: 100%;
height: 100%;
}
}
.con-right {
flex: 1;
margin-right: 24rpx;
display: flex;
flex-direction: column;
text {
display: block;
}
.con-title {
margin-top: 12rpx;
line-height: 60rpx;
color: rgba(0, 0, 0, 1);
font-size: 28rpx;
}
.con-content {
color: rgba(108, 108, 108, 1);
font-size: 24rpx;
// line-height: 36rpx;
margin-top: 14rpx;
flex: 1;
text {
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
overflow: hidden;
text-overflow: ellipsis;
line-height: 1.5em;
/* 这个值根据你的需求调整,这里假设为1.5倍行高 */
max-height: 3em;
/* 3行的高度 */
width: 100%;
/* 根据需要设置宽度 */
word-wrap: break-word;
/* 允许在单词内换行 */
word-break: break-all;
/* 允许在任意字符处换行 */
}
}
.con-btn {
margin-top: 56rpx;
margin-bottom: 32rpx;
display: inline-block;
text-align: right;
}
}
}
}
}
}
</style>

@ -180,7 +180,6 @@ export default {
},
formSubmit() {
console.log("form表单的提交", this.registerInfo);
// uni.navigateTo({
// url: "/pages/register/registerSuccess",
// });

@ -1,78 +0,0 @@
<template>
<view class="page-css">
<view class="search-box">
<betone-new-input v-model="searchInfo.name" placeholder="搜索物品名称" icon="search" style="margin-bottom: 32rpx"
@changevalue="searchData()" />
</view>
<view class="material-box">
</view>
<view class="evaluate_box">
<!-- <view class="evaluate_btn">
确定
</view> -->
<u-button class="evaluate_btn" size="medium" type="primary">确定</u-button>
</view>
</view>
</template>
<script>
export default {
data() {
return {
searchInfo: {
name: '',
}
}
},
methods: {
searchData() {
//
}
}
}
</script>
<style lang="scss" scoped>
.page-css {
padding: 0;
display: flex;
flex-direction: column;
.search-box {
background: rgba(248, 248, 248, 1);
height: 140rpx;
padding: 0 32rpx 0;
}
.material-box{
flex: 1;
background: #fff;
margin: 24rpx 24rpx 178rpx 24rpx;
border-radius: 20rpx;
overflow: auto;
}
.evaluate_box {
width: 100%;
height: 154rpx;
bottom: 0;
position: fixed;
background: #fff;
display: flex;
align-items: center;
justify-content: flex-end;
.evaluate_btn {
width: 160rpx;
height: 60rpx;
border-radius: 8rpx;
background-color: rgba(255, 255, 255, 1);
color: rgba(58, 98, 215, 1);
font-size: 24rpx;
text-align: center;
font-family: PingFangSC-regular;
border: 2rpx solid rgba(58, 98, 215, 1);
margin-right: 26rpx;
display: flex;
align-items: center;
justify-content: center;
}
}
}
</style>

@ -1,22 +1,26 @@
<template>
<view class="pages-css" :style="{ 'padding-bottom': (detailForm.status == 5 && userInfo.role_id == '1846419477876510721') ? '180rpx' : '20rpx'}">
<view class="pages-css"
:style="{ 'padding-bottom': (detailForm.status == 5 && dataTypes == 1) ? '180rpx' : '20rpx' }">
<view class="">
<view class="status_box" v-if="detailForm.status != 2">
<view class="status_top">
<text class="status_txt">
{{ detailForm.status == 0 ? '待接单' :
detailForm.status == 2 ? '待维修' : detailForm.status == 3 ? '维修中' : (detailForm.status == 4 || detailForm.status == 5) ? '维修完成' : '维修完成' }}</text>
{{ detailForm.status == 0 ? '待接单' :
detailForm.status == 2 ? '待维修' : detailForm.status == 3 ? '维修中' : (detailForm.status == 4 ||
detailForm.status == 5) ? '维修完成' : '维修完成' }}</text>
<view class="load_more">
<text class="load_more_txt">查看更多</text>
<image style="transform: rotate(90deg);width: 40rpx;height: 40rpx;"
:src="require('@/static/images/loadmore.png')" alt="" />
<image style="transform: rotate(90deg);width: 40rpx;height: 40rpx;"
:src="require('@/static/images/loadmore.png')" alt="" />
</view>
</view>
<view class="status_bottom">
<text class="status_tip">
{{ detailForm.status == 0 ? '【待接单】当前工单等待接单中' : (detailForm.status == 2) ? '【待维修】当前工单等待维修中' : (detailForm.status == 3 || detailForm.status == 4) ? '【维修中】维修人员正在进行维修' : '【维修完成】维修完成,请尽快完成评价' }}
{{ detailForm.status == 0 ? '【待接单】当前工单等待接单中' : (detailForm.status == 2) ? '【待维修】当前工单等待维修中' :
(detailForm.status == 3 || detailForm.status == 4) ? '【维修中】维修人员正在进行维修' : '【维修完成】维修完成,请尽快完成评价' }}
</text>
<text class="status_date">{{detailForm.createTime && detailForm.createTime.substring(0,10)}}</text>
<text class="status_date">{{ detailForm.createTime && detailForm.createTime.substring(0, 10)
}}</text>
</view>
</view>
@ -41,7 +45,8 @@
<view class="detail_item">
<text class="item_left_txt">故障视频</text>
<view class="item_right_txt video">
<video v-show="videoUrl != ''" :src="videoUrl" style="width: 450rpx; height: 320rpx" controls></video>
<video v-show="videoUrl != ''" :src="videoUrl" style="width: 450rpx; height: 320rpx"
controls></video>
<video v-if="detailForm.videoAttaches && detailForm.videoAttaches.length > 0"
:src="detailForm.videoAttaches[0].link" style="width: 148px; height: 148px"
controls></video>
@ -50,27 +55,29 @@
<view class="detail_item">
<text class="item_left_txt">故障图片</text>
<view class="item_right_txt video">
<img style="width: 130rpx;height: 140rpx;margin-bottom: 10rpx;" v-for="item in detailForm.picAttaches" :key="item.id" :src="item.link" alt="" />
<image style="width: 130rpx;height: 140rpx;margin-bottom: 10rpx;"
v-for="item in detailForm.picAttaches" :key="item.id" :src="item.link" alt="" />
</view>
</view>
</view>
<view class="repair_detail" v-if="detailForm.status != 2" v-show="detailForm.status == 4 || detailForm.status == 5 || detailForm.status == '6'">
<view class="repair_detail"
v-if="detailForm.status == 4 || detailForm.status == 5 || detailForm.status == '6'">
<view class="repair_title">维修详情</view>
<view class="detail_item">
<text class="item_left_txt">维修人</text>
<text class="item_right_txt">{{detailForm.repairPersonName}}</text>
<text class="item_right_txt">{{ detailForm.repairPersonName }}</text>
</view>
<view class="detail_item">
<text class="item_left_txt">设备名称</text>
<text class="item_right_txt">{{detailForm.deviceName}}</text>
<text class="item_right_txt">{{ detailForm.deviceName }}</text>
</view>
<view class="detail_item">
<text class="item_left_txt">故障原因</text>
<text class="item_right_txt reason">{{detailForm.faultCause}}</text>
<text class="item_right_txt reason">{{ detailForm.faultCause }}</text>
</view>
<view class="detail_item" style="margin-top: 10rpx;">
<text class="item_left_txt">处理方法</text>
<text class="item_right_txt reason">{{detailForm.processMethod}}</text>
<text class="item_right_txt reason">{{ detailForm.processMethod }}</text>
</view>
<view class="detail_item" v-show="detailForm.materials && detailForm.materials.length != 0">
<text class="item_left_txt">维修材料</text>
@ -102,62 +109,131 @@
<view class="repair_title">其他信息</view>
<view class="detail_item">
<text class="item_left_txt">提报人</text>
<text class="item_right_txt">{{detailForm.informantName}}</text>
<text class="item_right_txt">{{ detailForm.informantName }}</text>
</view>
<view class="detail_item">
<text class="item_left_txt">提报人电话</text>
<text class="item_right_txt">{{detailForm.informantPhone}}</text>
<text class="item_right_txt">{{ detailForm.informantPhone }}</text>
</view>
<view class="detail_item">
<text class="item_left_txt">提报单号</text>
<text class="item_right_txt">{{detailForm.requirementCode}}</text>
<text class="item_right_txt">{{ detailForm.requirementCode }}</text>
</view>
<view class="detail_item">
<text class="item_left_txt">提报时间</text>
<text class="item_right_txt">{{detailForm.createTime}}</text>
<text class="item_right_txt">{{ detailForm.createTime }}</text>
</view>
<view class="detail_item" v-show="detailForm.status != 0">
<text class="item_left_txt">系统接单时间</text>
<text class="item_right_txt">2024-10-12 08:45</text>
<text class="item_right_txt">{{ detailForm.dispatchTime }}</text>
</view>
<view class="detail_item" v-show="detailForm.status != 0">
<text class="item_left_txt">客服意见</text>
<text class="item_right_txt reason">{{ detailForm.customerOpinion }}</text>
</view>
</view>
<!-- 维修按钮 并且是维修人员角色 进来显示 -->
<view class="repair_detail" v-if="detailForm.status == 2 && dataTypes == 4">
<view class="repair_title">处理情况</view>
<view class="detail_item">
<text class="item_left_txt">接单时间</text>
<text class="item_right_txt reason">2024/8/20 9:25:30</text>
</view>
</view>
<view class="repair_detail" v-if="detailForm.status == 2 && dataTypes == 4">
<view class="repair_title">维修详情</view>
<u-form labelPosition="left" :rules="rules" ref="repairDetailsForm" :model="repairDetails"
:label-width="140" class="repair_form">
<u-form-item label="填报人:" prop="reportPeople" :border-bottom="false">
<betone-new-input :disabled="true" label="" v-model="repairDetails.reportPeople"
placeholder="请输入" />
</u-form-item>
<u-form-item label="设备名称:" prop="deviceName" :border-bottom="false">
<betone-new-input :disabled="true" label="" v-model="repairDetails.deviceName"
placeholder="请输入" />
</u-form-item>
<u-form-item label="故障原因:" prop="faultReason" :border-bottom="false" :isRequire="true">
<betone-new-input label="" v-model="repairDetails.faultReason" placeholder="请输入"
type="textarea" />
</u-form-item>
<u-form-item label="处理方法:" prop="dealMethods" :border-bottom="false" :isRequire="true">
<betone-new-input label="" v-model="repairDetails.dealMethods" placeholder="请输入"
type="textarea" />
</u-form-item>
<u-form-item label="是否申领物料:" prop="isMaterial" :border-bottom="false" :label-width="200" :isRequire="true">
<uni-data-checkbox v-model="repairDetails.isMaterial"
:localdata="isMaterialList"></uni-data-checkbox>
</u-form-item>
</u-form>
<view class="selectForm clearfix" v-if="repairDetails.isMaterial == 1">
<view class="form-item form-label">维修材料:</view>
<view class="form-item">
<view class="select-box clearfix">
<view class="select-box-item clearfix" v-for="(item, index) in selectGoodsList"
:key="index">
<view class="material-text">名称{{ item.name }}</view>
<view class="material-text">规格{{ item.rule }}</view>
<view class="material-text">型号{{ item.xh }}</view>
<view class="material-text">数量{{ item.goodsNum }}</view>
<view class="material-text">单位{{ item.unit }}</view>
<view class="material-text">价格{{ item.brand }}</view>
</view>
</view>
<u-button size="medium" :plain="true" style="margin-right: 32rpx;width:100%" type="primary"
@click="goodsSelect()">{{ selectGoodsList.length > 0 ? '修改' : '添加' }}</u-button>
</view>
</view>
</view>
<view class="repair-btn" style="margin-right: 32rpx;width:100%"
v-if="detailForm.status == 2 && dataTypes == 4">
<!-- <u-button size="medium">保存</u-button> -->
<u-button size="medium" type="primary" @click="repairSubmit()">提交</u-button>
</view>
</view>
<view class="evaluate_box" v-if="detailForm.status == 5" v-show="detailForm.status == 5 && userInfo.role_id == '1846419477876510721'">
<view class="evaluate_box" v-if="detailForm.status == 5 && dataTypes == 1">
<view class="evaluate_btn">
评价
</view>
</view>
<!-- 物料选择 -->
<betone-dialog v-model="aterialShow" height="1300">
<view class="search-box">
<betone-new-input v-model="goodsearchInfo.goodsName" placeholder="搜索物品名称" icon="search"
style="margin-bottom: 32rpx" @changevalue="searchGoodsData()" />
</view>
<scroll-view class="scroll-Y" @scrolltolower="goodsLower" scroll-y="true"
style="max-height: 1000rpx; width: auto; background-color: gainsboro;">
<view class="material-box">
<view class="material-item" v-for="(item, index) in goodsTableData" :key="index">
<view class="title-wrapper">
<u-checkbox v-model="item.checked" shape="circle"></u-checkbox>
</view>
<view class="item-right">
<view class="material-title">
<text class="material-title-name">{{ item.name }}</text>
<text class="material-title-code">{{ item.code }}</text>
<text>库存数{{ item.num }}</text>
</view>
<view class="material-text">品牌{{ item.brand }}</view>
<view class="material-text">型号{{ item.xh }}</view>
<view class="material-num">
<text>参数{{ item.rule }}</text><u-number-box v-model="item.goodsNum"
:step="1"></u-number-box>
</view>
</view>
</view>
</view>
</scroll-view>
<view class="material-btn">
<u-button size="medium" @click="aterialShow = false">取消</u-button>
<u-button size="medium" type="primary" @click="goodsSubmit()">确认</u-button>
</view>
</betone-dialog>
</view>
</template>
<script>
export default {
data() {
return {
totalPrice:'',
discount:'9',
discountPrice:'975.60',
detailId:'',
detailForm:{},
videoUrl:'',
userInfo:{}
}
},
onLoad(options){
console.log('options==========>',options)
this.userInfo = uni.getStorageSync("userinfo");
console.log('info========?',this.userInfo)
this.detailId = options.id
this.getDetail()
},
mounted() {
},
methods:{
getDetail(){
let query_ = {
id: this.detailId
}
this.$u.api.getBreakdownInfo(query_).then(res => {
export default {
computed: {
dataTypes() {
@ -188,7 +264,9 @@ export default {
discountPrice: '975.60',
detailId: '',
detailForm: {},
videoUrl: '',
userInfo: {},
//
isMaterialList: [
{
text: '是',
@ -199,6 +277,7 @@ export default {
value: 0
}
],
//
repairDetails: {
reportPeople: '',//
deviceName: '',//
@ -207,20 +286,50 @@ export default {
isMaterial: '',//
materialTable: [],//
},
rules: [
rules: {
faultReason: [
{
type: "string",
required: true,
message: "请输入",
trigger: ["blur", "change"],
}
],
dealMethods: [
{
type: "string",
required: true,
message: "请输入",
trigger: ["blur", "change"],
}
]
},
aterialShow: false,//
goodsearchInfo: {
goodsName: '',
},
goodsTableData: [],
goodspage: {
current: 1,
size: 10,
},
isGoodsNomore: false,
]
selectGoodsList: []
}
},
onLoad(options) {
//
this.userInfo = uni.getStorageSync("userinfo");
this.detailId = options.id
this.getDetail()
},
mounted() {
mounted() {
this.getGoodsList()
},
methods: {
//
getDetail() {
let query_ = {
id: this.detailId
@ -232,14 +341,114 @@ export default {
this.totalPrice = res.data.totalPrice == -1 ? res.data.materials.reduce((sum, item) => sum + item.materialPrice, 0) : res.data.totalPrice
this.discount = res.data.discount == -1 ? '' : res.data.discount
this.discountPrice = res.data.discountPrice == -1 ? '' : res.data.discountPrice
this.repairDetails.reportPeople = this.detailForm.repairPersonName //
this.repairDetails.deviceName = this.detailForm.deviceName //
}
})
},
//
repairSubmit() {
this.$refs.repairDetailsForm.setRules(this.rules);
//
// goodsType: item.bigClass, //
// goodsName: item.name, //
// goodsSize: item.rule, //
// goodsModel: item.rule, //
// goodsNum: item.goodsNum, //
// goodsUnit: item.unit, //
// goodsPrice: item.Price,
// this.repairDetailsForm
this.$refs.repairDetailsForm.validate(valid => {
if(valid){
console.log(111111111, '校验通过')
}
})
},
//
statusName(item) {
if (item == -1) {
return '待提报'
}
if (item == 0) {
return '待接单'
}
if (item == 1 || item == 2 || item == 3) {
return '待维修'
}
if (item == 4 || item == 5 || item == 6) {
return '已完成'
}
},
//
goodsSelect() {
this.aterialShow = true
//
//
// this.goodsTableData
this.goodsTableData.forEach(i => {
i.checked = false
})
if (this.selectGoodsList.length > 0) {
this.goodsTableData.forEach(i => {
this.selectGoodsList.forEach(v => {
if (i.id == v.id) {
i.checked = true
}
})
})
}
},
//
goodsSubmit() {
let selected = this.goodsTableData.filter(i => {
return i.checked
})
this.selectGoodsList = JSON.parse(JSON.stringify(selected))
this.aterialShow = false
},
//
getGoodsList() {
let query_ = {
...this.goodspage
}
this.$u.api.getGoodsList(query_).then(res => {
if (res.code == 200) {
var totalPage = res.data.total;
var newOrders = res.data.records;
newOrders.forEach(element => {
// element.rule = element.rule == '' ? 0 : Number(element.rule)
this.$set(element, 'goodsNum', 0)
this.$set(element, 'checked', false)
});
this.goodsTableData = [...this.goodsTableData, ...(res.data.records || [])];
if (newOrders.length == 0) {
// this.loadingState = "nomore";
this.isGoodsNomore = true;
}
if (totalPage == this.goodsTableData.length) {
// this.loadingState = "nomore";
this.isGoodsNomore = true;
}
}
})
},
//
searchGoodsData() {
// selectGoodsList
},
//
goodsLower() {
if (this.isGoodsNomore) {
return;
}
this.goodspage.current++;
this.getGoodsList();
},
//
goPage(path) {
uni.navigateTo({
url: path,
@ -247,15 +456,16 @@ export default {
}
}
}
</script>
<style lang="scss" scoped>
.pages-css {
width: 100%;
padding: 0;
background: rgba(239, 239, 239, 1);
padding-top: 26rpx;
.pages-css {
width: 100%;
padding: 0;
background: rgba(239, 239, 239, 1);
padding-top: 26rpx;
padding-bottom: 180rpx;
.status_box {
margin: 0 24rpx 20rpx;
@ -338,15 +548,15 @@ export default {
align-items: center;
justify-content: space-between;
.item_left_txt {
color: rgba(108, 108, 108, 1);
font-size: 14px;
text-align: left;
font-family: SourceHanSansSC-regular;
width: 210rpx;
margin-right: 20rpx;
line-height: 60rpx;
}
.item_left_txt {
color: rgba(108, 108, 108, 1);
font-size: 14px;
text-align: left;
font-family: SourceHanSansSC-regular;
width: 210rpx;
margin-right: 20rpx;
line-height: 60rpx;
}
.item_right_txt {
max-width: calc(100% - 220rpx);
@ -406,14 +616,14 @@ export default {
overflow: hidden;
text-overflow: ellipsis;
}
.video{
margin-top: 10rpx;
display: flex;
flex-wrap: wrap;
align-items: center;
justify-content: space-between;
}
.video {
margin-top: 10rpx;
display: flex;
flex-wrap: wrap;
align-items: center;
justify-content: space-between;
}
}
}
@ -460,5 +670,117 @@ export default {
width: 100%;
}
}
/deep/.popup-content {
display: flex;
flex-direction: column;
overflow: hidden;
}
.select-box {
width: 100%;
.select-box-item {
width: 100%;
border-radius: 20rpx;
background-color: rgba(249, 249, 249, 1);
margin-bottom: 32rpx;
line-height: 60rpx;
color: rgba(108, 108, 108, 1);
font-size: 28rpx;
padding: 24rpx;
}
}
.material-box {
flex: 1;
background: #fff;
margin: 0;
overflow: auto;
// padding-bottom: 32rpx;
.material-item {
height: 300rpx;
border-radius: 20rpx;
background-color: rgba(249, 249, 249, 1);
margin: 32rpx 0 0;
padding: 32rpx;
display: flex;
flex-direction: row;
.title-wrapper {}
.item-right {
flex: 1;
.material-title {
display: flex;
flex-direction: row;
color: rgba(108, 108, 108, 1);
font-size: 28rpx;
line-height: 60rpx;
.material-title-name {
color: rgba(51, 51, 51, 1);
font-size: 36rpx;
font-weight: 550;
padding-right: 16rpx;
}
.material-title-code {
flex: 1;
}
}
.material-text {
line-height: 60rpx;
color: rgba(108, 108, 108, 1);
font-size: 28rpx;
}
.material-num {
display: flex;
flex-direction: row;
justify-content: space-between;
}
}
}
}
.material-btn {
width: 100%;
display: flex;
justify-content: space-between;
/* 水平均匀分布 */
margin-top: 32rpx;
padding: 0 32rpx;
/deep/.u-btn {
width: 48%;
}
}
.selectForm {
width: 100%;
padding: 26rpx;
.form-item {
float: left;
width: calc(100% - 26rpx - 26rpx - 140rpx);
.material-text {
width: 50%;
float: left;
}
}
.form-label {
width: 140rpx;
text-align: center;
}
}
}
</style>

Binary file not shown.

After

Width:  |  Height:  |  Size: 445 B

@ -10,7 +10,7 @@
</view>
<input :disabled="disabledInput || disabled" :cursor-spacing="getCursorSpacing" :class="{ 'u-input-disabled': disabled }"
v-model="inputVal" class="u-number-input" @blur="onBlur" @focus="onFocus"
type="number" :style="{
type="digit" :style="{
color: color,
fontSize: size + 'rpx',
background: bgColor,

Loading…
Cancel
Save