|
@@ -1,108 +1,110 @@
|
|
|
<template>
|
|
<template>
|
|
|
<view>
|
|
<view>
|
|
|
- <view v-if="$util.isEmpty(orderInfo)"></view>
|
|
|
|
|
- <view class="work-info" v-else>
|
|
|
|
|
- <view class="work-detail">
|
|
|
|
|
- <view class="order-img">
|
|
|
|
|
- <image :src="orderInfo.cover"></image>
|
|
|
|
|
- </view>
|
|
|
|
|
- <view class="order-item">
|
|
|
|
|
- <view><text class="left">支数</text><text class="right">{{orderInfo.flowerNum}}</text></view>
|
|
|
|
|
- <view><text class="left">分类</text><text class="right">{{orderInfo.catName}}</text></view>
|
|
|
|
|
- <view><text class="left">名称</text><text class="right">{{orderInfo.name}}</text></view>
|
|
|
|
|
- <view><text class="left">数量</text><text class="right">{{orderInfo.num}}</text></view>
|
|
|
|
|
- <view><text class="left">商品编号</text><text class="right">{{orderInfo.goodsId}}</text></view>
|
|
|
|
|
- <view><text class="left">售价</text><text class="right">{{orderInfo.price||''}}</text></view>
|
|
|
|
|
- <view><text class="left">工单号</text><text class="right">{{orderInfo.workSn}}</text></view>
|
|
|
|
|
- <view><text class="left">订单号</text><text class="right">{{orderInfo.orderSn}}</text></view>
|
|
|
|
|
- <view><text class="left">状态</text><text class="right">{{getStatus(orderInfo.status)}}</text></view>
|
|
|
|
|
- <view><text class="left">备注</text><text class="right">{{orderInfo.remark}}</text></view>
|
|
|
|
|
- </view>
|
|
|
|
|
|
|
+ <view v-if="$util.isEmpty(orderInfo)" class="work-empty">
|
|
|
|
|
+ <text>暂无工单</text>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <view class="work-info" v-else>
|
|
|
|
|
+ <view class="work-detail">
|
|
|
|
|
+ <view class="order-img">
|
|
|
|
|
+ <image :src="orderInfo.cover"></image>
|
|
|
</view>
|
|
</view>
|
|
|
- <view class="work-item-detail">
|
|
|
|
|
|
|
+ <view class="order-item">
|
|
|
|
|
+ <view><text class="left">支数</text><text class="right">{{orderInfo.flowerNum}}</text></view>
|
|
|
|
|
+ <view><text class="left">分类</text><text class="right">{{orderInfo.catName}}</text></view>
|
|
|
|
|
+ <view><text class="left">名称</text><text class="right">{{orderInfo.name}}</text></view>
|
|
|
|
|
+ <view><text class="left">数量</text><text class="right">{{orderInfo.num}}</text></view>
|
|
|
|
|
+ <view><text class="left">商品编号</text><text class="right">{{orderInfo.goodsId}}</text></view>
|
|
|
|
|
+ <view><text class="left">售价</text><text class="right">{{orderInfo.price||''}}</text></view>
|
|
|
|
|
+ <view><text class="left">工单号</text><text class="right">{{orderInfo.workSn}}</text></view>
|
|
|
|
|
+ <view><text class="left">订单号</text><text class="right">{{orderInfo.orderSn}}</text></view>
|
|
|
|
|
+ <view><text class="left">状态</text><text class="right">{{getStatus(orderInfo.status)}}</text></view>
|
|
|
|
|
+ <view><text class="left">备注</text><text class="right">{{orderInfo.remark}}</text></view>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <view class="work-item-detail">
|
|
|
|
|
|
|
|
- <view class="flex-space right-detail-title">单位用材</view>
|
|
|
|
|
-
|
|
|
|
|
- <view class="unit-use-item">
|
|
|
|
|
- <view class="commodity-list">
|
|
|
|
|
- <view v-for="(s, idx) in orderItem" :key="idx" class="commodity-item" >
|
|
|
|
|
- <image class="item-icon" :src="s.cover" @click="pageTo({url:'/admin/item/detail',query:{id: s.id}})"></image>
|
|
|
|
|
- <view class="item-info">
|
|
|
|
|
- <view class="info-line">
|
|
|
|
|
- <text class="item-name">{{ s.name }}</text>
|
|
|
|
|
- <text class="item-price">
|
|
|
|
|
- <text class="unit">{{s.num}}{{s.unitName}}</text>
|
|
|
|
|
- </text>
|
|
|
|
|
- </view>
|
|
|
|
|
- <view class="info-line">
|
|
|
|
|
- <text class="item-type">{{s.ratio}}{{s.smallName}}/{{s.bigName}}</text>
|
|
|
|
|
- </view>
|
|
|
|
|
|
|
+ <view class="flex-space right-detail-title">单位用材</view>
|
|
|
|
|
+
|
|
|
|
|
+ <view class="unit-use-item">
|
|
|
|
|
+ <view class="commodity-list">
|
|
|
|
|
+ <view v-for="(s, idx) in orderItem" :key="idx" class="commodity-item" >
|
|
|
|
|
+ <image class="item-icon" :src="s.cover" @click="pageTo({url:'/admin/item/detail',query:{id: s.id}})"></image>
|
|
|
|
|
+ <view class="item-info">
|
|
|
|
|
+ <view class="info-line">
|
|
|
|
|
+ <text class="item-name">{{ s.name }}</text>
|
|
|
|
|
+ <text class="item-price">
|
|
|
|
|
+ <text class="unit">{{s.num}}{{s.unitName}}</text>
|
|
|
|
|
+ </text>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <view class="info-line">
|
|
|
|
|
+ <text class="item-type">{{s.ratio}}{{s.smallName}}/{{s.bigName}}</text>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
- <view class="summary-bar">
|
|
|
|
|
- <view class="operate-view" ></view>
|
|
|
|
|
- <view class="describe-view">
|
|
|
|
|
- <text v-if="Number(unitUseItem.bigNum)>0">{{unitUseItem.bigNum}}扎</text>
|
|
|
|
|
- <text v-if="Number(unitUseItem.smallNum)>0">{{unitUseItem.smallNum}}支</text>
|
|
|
|
|
- </view>
|
|
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <view class="summary-bar">
|
|
|
|
|
+ <view class="operate-view" ></view>
|
|
|
|
|
+ <view class="describe-view">
|
|
|
|
|
+ <text v-if="Number(unitUseItem.bigNum)>0">{{unitUseItem.bigNum}}扎</text>
|
|
|
|
|
+ <text v-if="Number(unitUseItem.smallNum)>0">{{unitUseItem.smallNum}}支</text>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
|
|
+ </view>
|
|
|
|
|
|
|
|
- <view style="height:2vh;background-color:#EEEEEE;"></view>
|
|
|
|
|
|
|
+ <view style="height:2vh;background-color:#EEEEEE;"></view>
|
|
|
|
|
|
|
|
- <view class="flex-space right-detail-title"> 累计用材 </view>
|
|
|
|
|
-
|
|
|
|
|
- <view class="total-use-item">
|
|
|
|
|
- <view class="commodity-list">
|
|
|
|
|
- <view v-for="(s, idx) in orderItem" :key="idx" class="commodity-item" >
|
|
|
|
|
- <image class="item-icon" :src="s.cover" @click="pageTo({url:'/admin/item/detail',query:{id: s.id}})" />
|
|
|
|
|
- <view class="item-info">
|
|
|
|
|
- <view class="info-line">
|
|
|
|
|
- <text class="item-name">{{ s.name }}</text>
|
|
|
|
|
- <text class="item-price">
|
|
|
|
|
- <text class="unit">{{(s.num*orderInfo.num).toFixed()}}{{s.unitName}}</text>
|
|
|
|
|
- </text>
|
|
|
|
|
- </view>
|
|
|
|
|
- <view class="info-line">
|
|
|
|
|
- <text class="item-type">{{s.ratio}}{{s.smallName}}/{{s.bigName}}</text>
|
|
|
|
|
- <text style="font-size:9upx;position:relative;right:80upx;top:10upx;" v-if="Number(s.wastNum)>0">{{s.wastNum}}{{s.wastUnitName}}</text>
|
|
|
|
|
- <button class="wastage" @click="wastageFn(s)">报损</button>
|
|
|
|
|
- </view>
|
|
|
|
|
|
|
+ <view class="flex-space right-detail-title"> 累计用材 </view>
|
|
|
|
|
+
|
|
|
|
|
+ <view class="total-use-item">
|
|
|
|
|
+ <view class="commodity-list">
|
|
|
|
|
+ <view v-for="(s, idx) in orderItem" :key="idx" class="commodity-item" >
|
|
|
|
|
+ <image class="item-icon" :src="s.cover" @click="pageTo({url:'/admin/item/detail',query:{id: s.id}})" />
|
|
|
|
|
+ <view class="item-info">
|
|
|
|
|
+ <view class="info-line">
|
|
|
|
|
+ <text class="item-name">{{ s.name }}</text>
|
|
|
|
|
+ <text class="item-price">
|
|
|
|
|
+ <text class="unit">{{(s.num*orderInfo.num).toFixed()}}{{s.unitName}}</text>
|
|
|
|
|
+ </text>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <view class="info-line">
|
|
|
|
|
+ <text class="item-type">{{s.ratio}}{{s.smallName}}/{{s.bigName}}</text>
|
|
|
|
|
+ <text style="font-size:9upx;position:relative;right:80upx;top:10upx;" v-if="Number(s.wastNum)>0">{{s.wastNum}}{{s.wastUnitName}}</text>
|
|
|
|
|
+ <button class="wastage" @click="wastageFn(s)">报损</button>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
- <view class="summary-bar">
|
|
|
|
|
- <view class="operate-view" ></view>
|
|
|
|
|
- <view class="describe-view">
|
|
|
|
|
- <text v-if="Number(totalUseItem.bigNum)>0">{{totalUseItem.bigNum}}扎</text>
|
|
|
|
|
- <text v-if="Number(totalUseItem.smallNum)>0">{{totalUseItem.smallNum}}支</text>
|
|
|
|
|
- </view>
|
|
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <view class="summary-bar">
|
|
|
|
|
+ <view class="operate-view" ></view>
|
|
|
|
|
+ <view class="describe-view">
|
|
|
|
|
+ <text v-if="Number(totalUseItem.bigNum)>0">{{totalUseItem.bigNum}}扎</text>
|
|
|
|
|
+ <text v-if="Number(totalUseItem.smallNum)>0">{{totalUseItem.smallNum}}支</text>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
|
|
+ </view>
|
|
|
|
|
|
|
|
- <view class="button-area">
|
|
|
|
|
- <view :class="[orderInfo.status==0 ? 'active' : '']" @tap="finishFn()">完成</view>
|
|
|
|
|
- <view :class="[orderInfo.status != 2 && orderInfo.stockLock==0 ? 'active' : '']" @click="modifyItem(orderInfo)">修改</view>
|
|
|
|
|
- <view :class="[orderInfo.status != 2 && orderInfo.stockLock==0 ? 'active' : '']" @click="lockFn()">锁定</view>
|
|
|
|
|
- <view :class="[orderInfo.status==1 ? 'active' : '']" @click="printFn()">打印</view>
|
|
|
|
|
- <view :class="[orderInfo.status==0 ? 'active' : '']" @click="cancelFn()">取消</view>
|
|
|
|
|
- </view>
|
|
|
|
|
|
|
+ <view class="button-area">
|
|
|
|
|
+ <view :class="[orderInfo.status==0 ? 'active' : '']" @tap="finishFn()">完成</view>
|
|
|
|
|
+ <view :class="[orderInfo.status != 2 && orderInfo.stockLock==0 ? 'active' : '']" @click="modifyItem(orderInfo)">修改</view>
|
|
|
|
|
+ <view :class="[orderInfo.status != 2 && orderInfo.stockLock==0 ? 'active' : '']" @click="lockFn()">锁定</view>
|
|
|
|
|
+ <view :class="[orderInfo.status==1 ? 'active' : '']" @click="printFn()">打印</view>
|
|
|
|
|
+ <view :class="[orderInfo.status==0 ? 'active' : '']" @click="cancelFn()">取消</view>
|
|
|
|
|
+ </view>
|
|
|
|
|
|
|
|
- <!-- 选数量金额 -->
|
|
|
|
|
- <uni-popup ref="wastageSelectNumRef" background-color="#fff" type="center" :animation="false">
|
|
|
|
|
- <wastageSelectNum @confirmWastageSelectNum="confirmWastageSelectNum" :customData.sync="customData"
|
|
|
|
|
- @cancelWastageSelectNum="cancelWastageSelectNum"></wastageSelectNum>
|
|
|
|
|
- </uni-popup>
|
|
|
|
|
|
|
+ <!-- 选数量金额 -->
|
|
|
|
|
+ <uni-popup ref="wastageSelectNumRef" background-color="#fff" type="center" :animation="false">
|
|
|
|
|
+ <wastageSelectNum @confirmWastageSelectNum="confirmWastageSelectNum" :customData.sync="customData"
|
|
|
|
|
+ @cancelWastageSelectNum="cancelWastageSelectNum"></wastageSelectNum>
|
|
|
|
|
+ </uni-popup>
|
|
|
|
|
|
|
|
- <uni-popup ref="cancelWorkRef" type="dialog">
|
|
|
|
|
- <uni-popup-dialog type="info" cancelText="取消" confirmText="确认" title="提示" content="确认取消?" @confirm="confirmCancel"></uni-popup-dialog>
|
|
|
|
|
- </uni-popup>
|
|
|
|
|
|
|
+ <uni-popup ref="cancelWorkRef" type="dialog">
|
|
|
|
|
+ <uni-popup-dialog type="info" cancelText="取消" confirmText="确认" title="提示" content="确认取消?" @confirm="confirmCancel"></uni-popup-dialog>
|
|
|
|
|
+ </uni-popup>
|
|
|
|
|
|
|
|
- <uni-popup ref="lockWorkRef" type="dialog">
|
|
|
|
|
- <uni-popup-dialog type="info" cancelText="取消" confirmText="确认" title="提示" content="确认锁定?" @confirm="confirmLock"></uni-popup-dialog>
|
|
|
|
|
- </uni-popup>
|
|
|
|
|
|
|
+ <uni-popup ref="lockWorkRef" type="dialog">
|
|
|
|
|
+ <uni-popup-dialog type="info" cancelText="取消" confirmText="确认" title="提示" content="确认锁定?" @confirm="confirmLock"></uni-popup-dialog>
|
|
|
|
|
+ </uni-popup>
|
|
|
|
|
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
@@ -187,6 +189,9 @@ export default {
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
|
|
+ cancelWastageSelectNum(){
|
|
|
|
|
+ this.$refs.wastageSelectNumRef.close()
|
|
|
|
|
+ },
|
|
|
finishFn(){
|
|
finishFn(){
|
|
|
uni.showLoading({mask:true})
|
|
uni.showLoading({mask:true})
|
|
|
finish({id:this.orderInfo.id}).then(res=>{
|
|
finish({id:this.orderInfo.id}).then(res=>{
|
|
@@ -251,6 +256,13 @@ export default {
|
|
|
}
|
|
}
|
|
|
</script>
|
|
</script>
|
|
|
<style lang="scss" scoped>
|
|
<style lang="scss" scoped>
|
|
|
|
|
+.work-empty{
|
|
|
|
|
+ display:flex;
|
|
|
|
|
+ font-size:13upx;
|
|
|
|
|
+ justify-content:center;
|
|
|
|
|
+ align-items:center;
|
|
|
|
|
+ height:90vh;
|
|
|
|
|
+}
|
|
|
.work-info{
|
|
.work-info{
|
|
|
display:flex;
|
|
display:flex;
|
|
|
height: 100%;
|
|
height: 100%;
|