Commit 6b5d59b5 by wangzhihui

添加库存

1 parent a2b3c672
Showing 34 changed files with 1524 additions and 944 deletions
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
"editor.defaultFormatter": "esbenp.prettier-vscode" "editor.defaultFormatter": "esbenp.prettier-vscode"
}, },
"[wxml]": { "[wxml]": {
"editor.defaultFormatter": "1251208555.wxml-pretty" "editor.defaultFormatter": "wechat.miniprogram.wxml-language-features"
}, },
"[wxss]": { "[wxss]": {
"editor.defaultFormatter": "esbenp.prettier-vscode" "editor.defaultFormatter": "esbenp.prettier-vscode"
......
...@@ -296,7 +296,8 @@ ...@@ -296,7 +296,8 @@
"van-uploader": "@vant/weapp/uploader/index", "van-uploader": "@vant/weapp/uploader/index",
"glsx-privacy": "glsk-applet-component/GlsxPrivacy/index", "glsx-privacy": "glsk-applet-component/GlsxPrivacy/index",
"empty-data": "/components/EmptyData/EmptyData", "empty-data": "/components/EmptyData/EmptyData",
"van-switch": "@vant/weapp/switch/index" "van-switch": "@vant/weapp/switch/index",
"inventory-info":"components/InventoryInfo/InventoryInfo"
}, },
"preloadRule": { "preloadRule": {
"pages/tabWorkOrder/pages/index/index": { "pages/tabWorkOrder/pages/index/index": {
......
// components/InventoryInfo/InventoryInfo.js
Component({
/**
* 组件的属性列表
*/
properties: {
// 是否显示弹窗
show: {
type: Boolean,
value: false,
observer: 'onShowChange'
},
// 库存信息数据
inventoryData: {
type: Object,
value: {},
observer: 'onDataChange'
},
// 自定义标题
title: {
type: String,
value: '库存信息'
}
},
/**
* 组件的初始数据
*/
data: {
// 弹窗显示状态
isShowing: false,
// 缓存的数据
dataList:[]
},
/**
* 组件的方法列表
*/
methods: {
/**
* 显示弹窗
*/
showPopup() {
this.setData({
isShowing: true
});
},
/**
* 隐藏弹窗
*/
hidePopup() {
this.setData({
isShowing: false
});
},
/**
* 关闭弹窗事件处理
*/
onClose() {
this.hidePopup();
// 触发关闭事件
this.triggerEvent('close');
},
/**
* 复制文本到剪贴板
*/
copyText(e) {
const { text } = e.currentTarget.dataset;
wx.setClipboardData({
data: text,
success: () => {
wx.showToast({
title: '复制成功',
icon: 'success',
duration: 1500
});
},
fail: () => {
wx.showToast({
title: '复制失败',
icon: 'none',
duration: 1500
});
}
});
},
/**
* 监听show属性变化
*/
onShowChange(newVal, oldVal) {
if (newVal !== oldVal) {
this.setData({
isShowing: newVal
});
}
},
/**
* 监听数据变化
*/
onDataChange(newVal, oldVal) {
if (newVal && typeof newVal === 'object') {
const dataList = Object.keys(newVal).map(key => ({
key: key,
value: newVal[key],
label: this.getFieldLabel(key)
}));
this.setData({
dataList: dataList
},()=>{
console.log(this.data.dataList)
});
}
},
/**
* 获取字段值(支持格式化)
*/
getFieldLabel(field) {
const fieldMap = {
upgradeGoodsCommodityCode: 'UID',
upgradeGoodsCode: '商品编码',
specification: '规格值',
stock: '库存总数'
};
return fieldMap[field] || field;
},
/**
* 获取字段值
*/
getFieldValue(field) {
const data = this.data.cachedData;
return data ? data[field] : '';
}
},
/**
* 组件生命周期函数
*/
lifetimes: {
attached() {
// 组件创建完成后执行
},
detached() {
// 组件销毁时执行
}
},
/**
* 外部样式类
*/
externalClasses: [
'custom-class'
]
});
\ No newline at end of file \ No newline at end of file
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file \ No newline at end of file
/* components/InventoryInfo/InventoryInfo.wxss */
.inventory-info-container {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
z-index: 9999999;
}
.overlay {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: rgba(0, 0, 0, 0.5);
}
.popup {
padding: 48rpx 0 0;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 80%;
max-width: 622rpx;
background-color: white;
border-radius: 16rpx;
overflow: hidden;
box-shadow: 0 8rpx 24rpx rgba(0, 0, 0, 0.1);
}
.popup-header {
font-size: 32rpx;
font-style: normal;
font-weight: 500;
text-align: center;
margin-bottom: 48rpx;
}
.popup-title {
font-size: 32rpx;
font-weight: 500;
color: #333;
}
.popup-content {
padding: 0 48rpx;
}
.info-item {
padding: 24rpx 0;
color: #292d33;
font-size: 28rpx;
position: relative;
.item {
display: flex;
align-items: flex-start;
width: calc(100% - 48rpx);
.key {
max-width: 130rpx;
white-space: nowrap;
}
.value {
white-space: wrap;
word-break: break-word;
word-wrap: break-word;
}
}
}
.copy-btn {
margin-left: 16rpx;
padding: 8rpx;
width: 32rpx;
height: 32rpx;
cursor: pointer;
position: absolute;
right: 0;
top: 50%;
transform: translateY(-50%);
image {
width: 100%;
}
}
.popup-footer {
padding: 30rpx;
text-align: center;
border-top: 1rpx solid #EBEDF0;
}
.close-btn {
width: 100%;
font-size: 32rpx;
color: #333;
}
<!-- components/InventoryInfo/InventoryInfo.wxml -->
<view class="inventory-info-container" wx:if="{{isShowing}}">
<view class="overlay" bindtap="onClose"></view>
<view class="popup">
<view class="popup-header">
<text class="popup-title">{{title}}</text>
</view>
<view class="popup-content">
<view wx:for="{{dataList}}" wx:key="key" class="info-item">
<view class="item">
<view class="key">{{item.label}}:</view>
<view class="value">{{item.value||'-'}}</view>
</view>
<view class="copy-btn" data-text="{{item.value}}" bindtap="copyText">
<image src="https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/equity/copy.png" class="image"></image>
</view>
</view>
</view>
<view class="popup-footer">
<view class="close-btn" bindtap="onClose">关闭</view>
</view>
</view>
</view>
<!--components/InventoryInfo/InventoryInfo.wxml-->
\ No newline at end of file \ No newline at end of file
/*
* @Author: 'wangzhihui' '1733904062@qq.com'
* @Date: 2024-08-12 17:25:55
* @LastEditors: 'wangzhihui' '1733904062@qq.com'
* @LastEditTime: 2026-03-19 16:54:44
* @FilePath: \dj-car-boutique-work-wechat\packageEquity\pages\aiInspection\components\contentItem\contentItem.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
// packageEquity/pages/aiInspection/components/contentItem/contentItem.js // packageEquity/pages/aiInspection/components/contentItem/contentItem.js
Component({ Component({
......
...@@ -159,6 +159,21 @@ Component({ ...@@ -159,6 +159,21 @@ Component({
} }
} }
this.triggerEvent('confirm', infoData) this.triggerEvent('confirm', infoData)
} },
openInventoryPopup(e){
let {inventory:{
upgradeGoodsCommodityCode,
upgradeGoodsCode,
specification,
stock
}} = e.target.dataset
const inventoryData ={
upgradeGoodsCommodityCode,
upgradeGoodsCode,
specification,
stock
}
this.triggerEvent('openInventory', inventoryData)
}
} }
}) })
\ No newline at end of file \ No newline at end of file
/* tabRepairOrder/components/outboundPopup/index.wxss */ /* tabRepairOrder/components/outboundPopup/index.wxss */
.text-hide { .text-hide {
white-space: nowrap; white-space: nowrap;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
} }
.outbound-popup-box { .outbound-popup-box {
height: calc(100% - var(--fontSize120)); height: calc(100% - var(--fontSize120));
.sub-title {
height: var(--fontSize112); .sub-title {
line-height: var(--fontSize112); height: var(--fontSize112);
border-bottom: var(--fontSize1) solid #EBEDF0; line-height: var(--fontSize112);
margin-bottom: var(--fontSize20); border-bottom: var(--fontSize1) solid #EBEDF0;
.text-center { margin-bottom: var(--fontSize20);
text-align: center;
font-weight: 500; .text-center {
color: #222222; text-align: center;
} font-weight: 500;
} color: #222222;
.outbound-box { }
height: calc(100% - var(--fontSize114)); }
.scroll-box {
height: 100%; .outbound-box {
} height: calc(100% - var(--fontSize114));
.qrcode-box {
margin: 0 var(--fontSize32); .scroll-box {
background: #F4F5F7; height: 100%;
border-radius: var(--fontSize11); }
padding: var(--fontSize24);
display: flex; .qrcode-box {
flex-flow: column; margin: 0 var(--fontSize32);
align-items: center; background: #F4F5F7;
image { border-radius: var(--fontSize11);
width: var(--fontSize256); padding: var(--fontSize24);
height: var(--fontSize256); display: flex;
} flex-flow: column;
.tips { align-items: center;
margin-top: var(--fontSize16);
font-size: var(--fontSize24); image {
color: #757980; width: var(--fontSize256);
} height: var(--fontSize256);
} }
.box {
padding: var(--fontSize40) var(--fontSize32) var(--fontSize2) var(--fontSize40); .tips {
position: relative; margin-top: var(--fontSize16);
margin: var(--fontSize20) 0 0; font-size: var(--fontSize24);
.title { color: #757980;
font-size: var(--fontSize28); }
color: #292D33; }
margin-bottom: var(--fontSize20);
position: relative; .box {
font-weight: 500; padding: var(--fontSize40) var(--fontSize32) var(--fontSize2) var(--fontSize40);
&::after { position: relative;
position: absolute; margin: var(--fontSize20) 0 0;
content: '';
width: var(--fontSize8); .title {
height: var(--fontSize44); font-size: var(--fontSize28);
background: #347BFF; color: #292D33;
left: calc(-1 * var(--fontSize40)); margin-bottom: var(--fontSize20);
top: 50%; position: relative;
transform: translateY(-50%); font-weight: 500;
}
.text-name { &::after {
max-width: calc(100% - var(--fontSize100)); position: absolute;
} content: '';
} width: var(--fontSize8);
.box-item { height: var(--fontSize44);
display: flex; background: #347BFF;
align-items: center; left: calc(-1 * var(--fontSize40));
justify-content: space-between; top: 50%;
height: var(--fontSize104); transform: translateY(-50%);
font-size: var(--fontSize28); }
.label {
color: #292D33; .title-name {
flex-shrink: 0; display: flex;
width: var(--fontSize180); align-items: center;
.required {
color: #f00; .inventory {
margin-left: var(--fontSize8); font-size: 24rpx;
} color: #347bff;
} white-space: nowrap;
.value-box { overflow: hidden;
width: calc(100% - var(--fontSize190)); text-overflow: ellipsis;
display: flex; margin-left: 14rpx;
align-items: center; }
justify-content: flex-end; }
}
.value { .text-name {
text-align: right; max-width: calc(100% - var(--fontSize250));
width: calc(100% - var(--fontSize32));
.placeholder {
color: #BEC1C7; }
} }
}
.pickerArrow { .box-item {
width: var(--fontSize32); display: flex;
height: var(--fontSize32); align-items: center;
} justify-content: space-between;
} height: var(--fontSize104);
.input-box { font-size: var(--fontSize28);
.label {
width: var(--fontSize330); .label {
} color: #292D33;
.value { flex-shrink: 0;
width: var(--fontSize240); width: var(--fontSize180);
.input {
width: 100%; .required {
height: var(--fontSize68); color: #f00;
min-height: var(--fontSize68); margin-left: var(--fontSize8);
border: var(--fontSize2) solid #DEE0E3; }
overflow: hidden; }
border-radius: var(--fontSize8);
text-align: right; .value-box {
box-sizing: border-box; width: calc(100% - var(--fontSize190));
padding: 0 var(--fontSize20); display: flex;
display: flex; align-items: center;
align-items: center; justify-content: flex-end;
justify-content: flex-end; }
-webkit-appearance: none;
appearance: none; .value {
&::placeholder { text-align: right;
position: relative; width: calc(100% - var(--fontSize32));
top: 0;
transform: none; .placeholder {
} color: #BEC1C7;
} }
.disabled { }
background: #DEE0E3;
} .pickerArrow {
} width: var(--fontSize32);
} height: var(--fontSize32);
.time-box { }
padding-bottom: var(--fontSize48); }
}
} .input-box {
} .label {
width: var(--fontSize330);
}
.value {
width: var(--fontSize240);
.input {
width: 100%;
height: var(--fontSize68);
min-height: var(--fontSize68);
border: var(--fontSize2) solid #DEE0E3;
overflow: hidden;
border-radius: var(--fontSize8);
text-align: right;
box-sizing: border-box;
padding: 0 var(--fontSize20);
display: flex;
align-items: center;
justify-content: flex-end;
-webkit-appearance: none;
appearance: none;
&::placeholder {
position: relative;
top: 0;
transform: none;
}
}
.disabled {
background: #DEE0E3;
}
}
}
.time-box {
padding-bottom: var(--fontSize48);
}
}
}
} }
.popup-footer { .popup-footer {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
padding: var(--fontSize20) var(--fontSize32) ; padding: var(--fontSize20) var(--fontSize32);
.btn {
height: var(--fontSize80); .btn {
box-sizing: border-box; height: var(--fontSize80);
border-radius: var(--fontSize12); box-sizing: border-box;
font-size: var(--fontSize32); border-radius: var(--fontSize12);
text-align: center; font-size: var(--fontSize32);
line-height: var(--fontSize80); text-align: center;
} line-height: var(--fontSize80);
.cancel { }
width: var(--fontSize186);
height: var(--fontSize76); .cancel {
color: #292D33; width: var(--fontSize186);
border: var(--fontSize2) solid #DEE0E3; height: var(--fontSize76);
} color: #292D33;
.confirm { border: var(--fontSize2) solid #DEE0E3;
width: calc(100% - var(--fontSize206)); }
background: #347BFF;
color: #fff; .confirm {
} width: calc(100% - var(--fontSize206));
background: #347BFF;
color: #fff;
}
} }
.popup-footer.isFullSucreen { .popup-footer.isFullSucreen {
padding-bottom: var(--fontSize68) !important;
}
\ No newline at end of file \ No newline at end of file
padding-bottom: var(--fontSize68) !important;
}
<!--tabRepairOrder/components/outboundPopup/index.wxml--> <!--tabRepairOrder/components/outboundPopup/index.wxml-->
<wxs src="../../index.wxs" module="filter" /> <wxs src="../../index.wxs" module="filter" />
<van-popup show="{{show}}" position="bottom" custom-style="height: 90%;" round closeable close-on-click-overlay="{{false}}" bind:close="cancel"> <van-popup show="{{show}}" position="bottom" custom-style="height: 90%;" round closeable close-on-click-overlay="{{false}}" bind:close="cancel">
<view class="outbound-popup-box" > <view class="outbound-popup-box">
<view class="sub-title"> <view class="sub-title">
<view class="text-center">{{title}}</view> <view class="text-center">{{title}}</view>
</view> </view>
<view class="outbound-box"> <view class="outbound-box">
<scroll-view scroll-y class="scroll-box" enhanced="{{true}}" scroll-top="{{scrollTop}}" show-scrollbar="{{false}}"> <scroll-view scroll-y class="scroll-box" enhanced="{{true}}" scroll-top="{{scrollTop}}" show-scrollbar="{{false}}">
<view class="qrcode-box"> <view class="qrcode-box">
<image src="{{weappQrcode}}" mode=""/> <image src="{{weappQrcode}}" mode="" />
<view class="tips">请仓库管理员扫描此二维码确认产品实际用料</view> <view class="tips">请仓库管理员扫描此二维码确认产品实际用料</view>
</view> </view>
<block wx:for="{{infoData.subOrderList}}" wx:key="index"> <block wx:for="{{infoData.subOrderList}}" wx:key="index">
<view class="box"> <view class="box">
<view class="title infoTitle"> <view class="title infoTitle">
<view class="text-name text-hide">{{filter.replaceItemText(item.upgradeGoodsAlias) ||filter.replaceItemText(item.upgradeGoodsName) || item.packageName||''}}</view> <view class="title-name">
</view> <view class="text-name text-hide">{{filter.replaceItemText(item.upgradeGoodsAlias) ||filter.replaceItemText(item.upgradeGoodsName) || item.packageName||''}}</view>
<view class="box-item"> <view class="inventory" bindtap="openInventoryPopup" data-inventory="{{item}}">库存{{item.stock}}</view>
<view class="label">产品膜卷号</view> </view>
<view class="value-box" bindtap="handleRollNumber" data-target="{{item}}" data-index="{{index}}"> </view>
<view class="value text-hide"> <!-- <view class="box-item">
<block wx:if="{{item.rollNumber}}">{{item.rollNumber}}</block> <view class="label">产品膜卷号</view>
<block wx:else><view class='placeholder'>请选择</view></block> <view class="value-box" bindtap="handleRollNumber" data-target="{{item}}" data-index="{{index}}">
</view> <view class="value text-hide">
<image class="pickerArrow" src="/components/images/arrow-x.png" /> <block wx:if="{{item.rollNumber}}">{{item.rollNumber}}</block>
</view> <block wx:else>
</view> <view class='placeholder'>请选择</view>
<view class="box-item input-box"> </block>
<view class="label">产品实际用料(米/件)<text class='required'>*</text></view> </view>
<view class="value"> <image class="pickerArrow" src="/components/images/arrow-x.png" />
<input class="input {{false ? 'disabled' : ''}}" bindinput="handleInput" value="{{item.materialsUsed}}" data-index="{{index}}" type="digit" placeholder-style="color: #BEC1C7;" placeholder="输入数字"/> </view>
</view> </view> -->
</view> <view class="box-item input-box">
</view> <view class="label">产品实际用料(米/件)<text class='required'>*</text></view>
</block> <view class="value">
<view class="box"> <input class="input {{false ? 'disabled' : ''}}" bindinput="handleInput" value="{{item.materialsUsed}}" data-index="{{index}}" type="digit" placeholder-style="color: #BEC1C7;" placeholder="输入数字" />
<view class="title infoTitle"> </view>
出库时间 </view>
</view> </view>
<view class="box-item time-box"> </block>
<view class="label" >产品出库时间</view> <view class="box">
<view class="value-box" bindtap="handleOutboundTime"> <view class="title infoTitle">
<view class="value text-hide"> 出库时间
<block wx:if="{{infoData.outBoundTime}}">{{infoData.outBoundTime}}</block> </view>
<block wx:else><view class='placeholder'>请选择</view></block> <view class="box-item time-box">
</view> <view class="label">产品出库时间</view>
<image class="pickerArrow" src="/components/images/arrow-x.png" /> <view class="value-box" bindtap="handleOutboundTime">
</view> <view class="value text-hide">
</view> <block wx:if="{{infoData.outBoundTime}}">{{infoData.outBoundTime}}</block>
</view> <block wx:else>
</scroll-view> <view class='placeholder'>请选择</view>
</view> </block>
</view> </view>
<view class="popup-footer {{ isFullSucreen?'isFullSucreen':'' }}" wx:if="{{filter.btnPermissions(userPermissions, 'WULIAOCHUKU')}}"> <image class="pickerArrow" src="/components/images/arrow-x.png" />
<view class="cancel btn text-center" bind:tap="cancel">取消</view> </view>
<view class="confirm btn text-center" bind:tap="confirm">确认核销出库</view> </view>
</view> </view>
</scroll-view>
</view>
</view>
<view class="popup-footer {{ isFullSucreen?'isFullSucreen':'' }}" wx:if="{{filter.btnPermissions(userPermissions, 'WULIAOCHUKU')}}">
<view class="cancel btn text-center" bind:tap="cancel">取消</view>
<view class="confirm btn text-center" bind:tap="confirm">确认核销出库</view>
</view>
</van-popup> </van-popup>
<film-roll-no-popup show="{{filmRollNoVisible}}" title="产品膜卷号" copyfilmRollNoList="{{filmRollNoList}}" filmSelectedItem="{{filmSelectedItem}}" bindconfirm="changefilmRollNo" bindcancel="handelCancelRollPopup"/>
<time-select show="{{timeVisible}}" title="产品出库时间" defaultTime="{{infoData.outBoundTime}}" bind:confirm="onTimeConfirm" bindcancel="onClosePicker"/>
\ No newline at end of file \ No newline at end of file
<film-roll-no-popup show="{{filmRollNoVisible}}" title="产品膜卷号" copyfilmRollNoList="{{filmRollNoList}}" filmSelectedItem="{{filmSelectedItem}}" bindconfirm="changefilmRollNo" bindcancel="handelCancelRollPopup" />
<time-select show="{{timeVisible}}" title="产品出库时间" defaultTime="{{infoData.outBoundTime}}" bind:confirm="onTimeConfirm" bindcancel="onClosePicker" />
\ No newline at end of file \ No newline at end of file
...@@ -35,6 +35,22 @@ Component({ ...@@ -35,6 +35,22 @@ Component({
* 组件的方法列表 * 组件的方法列表
*/ */
methods: { methods: {
openInventoryPopup(e){
console.log(e)
let {inventory:{
upgradeGoodsCommodityCode,
upgradeGoodsCode,
specification,
stock
}} = e.target.dataset
const inventoryData ={
upgradeGoodsCommodityCode,
upgradeGoodsCode,
specification,
stock
}
this.triggerEvent('openInventory', inventoryData)
},
choose(e) { choose(e) {
let { item } = e.currentTarget.dataset let { item } = e.currentTarget.dataset
let { goodsList } = this.data let { goodsList } = this.data
......
/* tabRepairOrder/components/relateGoodsPop/index.wxss */ /* tabRepairOrder/components/relateGoodsPop/index.wxss */
.goods-content { .goods-content {
width: calc(100% + var(--fontSize64)); width: calc(100% + var(--fontSize64));
height: 100%; height: 100%;
margin-left: calc(-1 * var(--fontSize32)); margin-left: calc(-1 * var(--fontSize32));
.content {
height: calc(100% - var(--fontSize104)); .content {
.box { height: calc(100% - var(--fontSize104));
border-bottom: var(--fontSize2) solid #EBEDF0;
.itemBox { .box {
display: flex; border-bottom: var(--fontSize2) solid #EBEDF0;
align-items: center;
.choose { .itemBox {
width: var(--fontSize32); display: flex;
height: var(--fontSize32); align-items: center;
margin: 0 var(--fontSize32);
} .choose {
.item { width: var(--fontSize32);
flex: 1; height: var(--fontSize32);
justify-content: space-between; margin: 0 var(--fontSize32);
padding-right: var(--fontSize32); }
width: calc(100% - var(--fontSize130));
height: var(--fontSize84); .item-box {
display: flex; padding: 20rpx 0;
align-items: center; padding-right: var(--fontSize32);
font-size: var(--fontSize28); width: calc(100% - var(--fontSize130));
color: #888888; border-top: var(--fontSize2) solid #EBEDF0;
position: relative; }
.labelWidth {
width: calc(100% - var(--fontSize180)); .item {
} flex: 1;
.value { justify-content: space-between;
width: 100%; display: flex;
display: flex; align-items: center;
justify-content: space-between; font-size: var(--fontSize28);
.name { color: #888888;
max-width: 85%; position: relative;
width:calc(100vw - var(--fontSize100))
} .labelWidth {
.text-hide { width: calc(100% - var(--fontSize180));
white-space: nowrap; }
overflow: hidden;
text-overflow: ellipsis; .value {
} width: 100%;
} display: flex;
} justify-content: space-between;
}
} .name {
} max-width: 85%;
.selected-box { width: calc(100vw - var(--fontSize100))
text-align: center; }
font-size: var(--fontSize28);
color: #888888; .text-hide {
margin-top: var(--fontSize30); white-space: nowrap;
text { overflow: hidden;
color: #347BFF; text-overflow: ellipsis;
} }
} }
}
.inventory {
margin-top: 4px;
max-width: 85%;
font-size: 24rpx;
color: #347bff;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
}
}
}
.selected-box {
text-align: center;
font-size: var(--fontSize28);
color: #888888;
margin-top: var(--fontSize30);
text {
color: #347BFF;
}
}
} }
<!--tabRepairOrder/components/relateGoodsPop/index.wxml--> <!--tabRepairOrder/components/relateGoodsPop/index.wxml-->
<wxs src="../../index.wxs" module="filter" /> <wxs src="../../index.wxs" module="filter" />
<popup show="{{show}}" title="选择关联商品" bindconfirm="confirm" height="50%" bindcancel="cancel"> <popup show="{{show}}" title="选择关联商品" bindconfirm="confirm" height="50%" bindcancel="cancel">
<view class="goods-content"> <view class="goods-content">
<scroll-view class="content" scroll-y show-scrollbar="{{false}}"> <scroll-view class="content" scroll-y show-scrollbar="{{false}}">
<block wx:if="{{goodsList.length > 0}}"> <block wx:if="{{goodsList.length > 0}}">
<view class="box"> <view class="box">
<block wx:for="{{goodsList}}" wx:key="ind" wx:for-index="ind" wx:for-item="i"> <block wx:for="{{goodsList}}" wx:key="ind" wx:for-index="ind" wx:for-item="i">
<view class="item-wrap"> <view class="item-wrap">
<view class="itemBox"> <view class="itemBox">
<view class="choose" catchtap="choose" data-ind="{{ind}}" data-item="{{i}}"> <view class="choose" catchtap="choose" data-ind="{{ind}}" data-item="{{i}}">
<image src="{{i.active ? '../../../components/images/radio.png' : '../../../components/images/radio_icon.png'}}" /> <image src="{{i.active ? '../../../components/images/radio.png' : '../../../components/images/radio_icon.png'}}" />
</view> </view>
<view class="item"> <view class="item-box">
<view class="value {{i.active?'labelWidth':''}}" catchtap="choose" data-ind="{{ind}}" data-item="{{i}}"> <view class="item">
<view class="name text-hide {{i.active?'textWidth':''}}"> <view class="value {{i.active?'labelWidth':''}}" catchtap="choose" data-ind="{{ind}}" data-item="{{i}}">
<text>{{filter.replaceItemText(i.goodsAlias) ||filter.replaceItemText(i.upgradeGoodsName) || filter.replaceItemText(i.goodsName)}}</text> <view class="name text-hide {{i.active?'textWidth':''}}">
<text wx:if="{{i.position && (i.goodsType == 1 || i.goodsType == baseConfigData.selfBuildFilmType)}}">{{'「' + i.positionStr+'」'}}</text> <text>{{filter.replaceItemText(i.goodsAlias) ||filter.replaceItemText(i.upgradeGoodsName) || filter.replaceItemText(i.goodsName)}}</text>
<!-- <text class="warning_text" wx:if="{{!i.goods.merchantGoodsPosition && (i.goods.goodsInfo.goodsType == 1 || i.goods.goodsInfo.goodsType == baseConfigData.selfBuildFilmType)}}">无部位</text> --> <text wx:if="{{i.position && (i.goodsType == 1 || i.goodsType == baseConfigData.selfBuildFilmType)}}">{{'「' + i.positionStr+'」'}}</text>
</view> <!-- <text class="warning_text" wx:if="{{!i.goods.merchantGoodsPosition && (i.goods.goodsInfo.goodsType == 1 || i.goods.goodsInfo.goodsType == baseConfigData.selfBuildFilmType)}}">无部位</text> -->
</view> </view>
</view> </view>
</view>
</view> </view>
</block> <view class="inventory" catch:tap="openInventoryPopup" data-inventory="{{i}}">库存{{i.stock}}</view>
</view> </view>
</block>
<block wx:else> </view>
<empty-data style="width: 100%;" /> </view>
</block> </block>
</scroll-view> </view>
<view class="selected-box">已选商品 <text>{{filter.activeNum(goodsList)}}</text> 件</view> </block>
</view> <block wx:else>
<empty-data style="width: 100%;" />
</block>
</scroll-view>
<view class="selected-box">已选商品 <text>{{filter.activeNum(goodsList)}}</text> 件</view>
</view>
</popup> </popup>
\ No newline at end of file \ No newline at end of file
<!--tabRepairOrder/components/outboundPopup/index.wxml--> <!--tabRepairOrder/components/outboundPopup/index.wxml-->
<wxs src="../../index.wxs" module="filter" /> <wxs src="../../index.wxs" module="filter" />
<van-popup show="{{ show }}" position="bottom" custom-style="height: 90%;" round closeable close-on-click-overlay="{{ false }}" bind:close="cancel"> <van-popup show="{{ show }}" position="bottom" custom-style="height: 90%;" round closeable close-on-click-overlay="{{ false }}" bind:close="cancel">
<view class="outbound-popup-box"> <view class="outbound-popup-box">
<view class="sub-title"> <view class="sub-title">
<view class="text-center">{{title}}</view> <view class="text-center">{{title}}</view>
</view> </view>
<view class="tips">返工是否产生退料返库,请与库管确认后提交返工</view> <view class="tips">返工是否产生退料返库,请与库管确认后提交返工</view>
<view class="outbound-box"> <view class="outbound-box">
<scroll-view scroll-y class="scroll-box" enhanced="{{ true }}" scroll-top="{{ scrollTop }}" show-scrollbar="{{ false }}"> <scroll-view scroll-y class="scroll-box" enhanced="{{ true }}" scroll-top="{{ scrollTop }}" show-scrollbar="{{ false }}">
<!-- <view class="qrcode-box"> <!-- <view class="qrcode-box">
<image src="{{ weappQrcode }}" mode="" /> <image src="{{ weappQrcode }}" mode="" />
<view class="tips">请仓库管理员扫描此二维码确认产品实际用料</view> <view class="tips">请仓库管理员扫描此二维码确认产品实际用料</view>
</view> --> </view> -->
<block wx:for="{{ infoData.subOrderList }}" wx:key="index"> <block wx:for="{{ infoData.subOrderList }}" wx:key="index">
<view class="box"> <view class="box">
<view class="title infoTitle"> <view class="title infoTitle">
<view class="text-name text-hide"> <view class="text-name text-hide">
{{filter.replaceItemText(item.upgradeGoodsAlias) ||filter.replaceItemText(item.upgradeGoodsName) || item.packageName||''}} {{filter.replaceItemText(item.upgradeGoodsAlias) ||filter.replaceItemText(item.upgradeGoodsName) || item.packageName||''}}
</view> </view>
</view> </view>
<view class="box-item"> <!-- <view class="box-item">
<view class="label">产品膜卷号</view> <view class="label">产品膜卷号</view>
<view class="value-box" data-target="{{ item }}" data-index="{{ index }}"> <view class="value-box" data-target="{{ item }}" data-index="{{ index }}">
<view class="value text-hide"> <view class="value text-hide">
<block wx:if="{{ item.rollNumber }}">{{item.rollNumber}}</block> <block wx:if="{{ item.rollNumber }}">{{item.rollNumber}}</block>
<block wx:else> <block wx:else>
- -
<!-- <view class="placeholder">请选择</view> --> =
</block> </block>
</view> </view>
<!-- <image class="pickerArrow" src="/components/images/arrow-x.png" /> -->
</view>
</view>
<view class="box-item input-box">
<view class="label">
退料入库数量(米/件)
<text class="required">*</text>
</view>
<view class="value">
<input class="input {{ false ? 'disabled' : '' }}" bindinput="handleInput" value="{{ item.materialsUsed }}" data-index="{{ index }}" type="digit" placeholder-style="color: #BEC1C7;" placeholder="输入数字" />
</view> </view>
</view> </view> -->
</view> <view class="box-item input-box">
</block> <view class="label">
<!-- <view class="box"> 退料入库数量(米/件)
<text class="required">*</text>
</view>
<view class="value">
<input class="input {{ false ? 'disabled' : '' }}" bindinput="handleInput" value="{{ item.materialsUsed }}" data-index="{{ index }}" type="digit" placeholder-style="color: #BEC1C7;" placeholder="输入数字" />
</view>
</view>
</view>
</block>
<!-- <view class="box">
<view class="title infoTitle">出库时间</view> <view class="title infoTitle">出库时间</view>
<view class="box-item time-box"> <view class="box-item time-box">
<view class="label">产品出库时间</view> <view class="label">产品出库时间</view>
...@@ -58,13 +58,13 @@ ...@@ -58,13 +58,13 @@
</view> </view>
</view> </view>
</view> --> </view> -->
</scroll-view> </scroll-view>
</view> </view>
</view> </view>
<view class="popup-footer {{ isFullSucreen?'isFullSucreen':'' }}"> <view class="popup-footer {{ isFullSucreen?'isFullSucreen':'' }}">
<view class="cancel btn text-center" bind:tap="cancel">取消</view> <view class="cancel btn text-center" bind:tap="cancel">取消</view>
<view class="confirm btn text-center" bind:tap="confirm">确认返工</view> <view class="confirm btn text-center" bind:tap="confirm">确认返工</view>
</view> </view>
</van-popup> </van-popup>
<film-roll-no-popup show="{{ filmRollNoVisible }}" title="产品膜卷号" copyfilmRollNoList="{{ filmRollNoList }}" filmSelectedItem="{{ filmSelectedItem }}" bindconfirm="changefilmRollNo" bindcancel="handelCancelRollPopup" /> <film-roll-no-popup show="{{ filmRollNoVisible }}" title="产品膜卷号" copyfilmRollNoList="{{ filmRollNoList }}" filmSelectedItem="{{ filmSelectedItem }}" bindconfirm="changefilmRollNo" bindcancel="handelCancelRollPopup" />
<time-select show="{{ timeVisible }}" title="产品出库时间" defaultTime="{{ infoData.outBoundTime }}" bind:confirm="onTimeConfirm" bindcancel="onClosePicker" /> <time-select show="{{ timeVisible }}" title="产品出库时间" defaultTime="{{ infoData.outBoundTime }}" bind:confirm="onTimeConfirm" bindcancel="onClosePicker" />
\ No newline at end of file \ No newline at end of file
...@@ -10,6 +10,13 @@ Page({ ...@@ -10,6 +10,13 @@ Page({
* 页面的初始数据 * 页面的初始数据
*/ */
data: { data: {
showInventory:false,
inventoryData: {
upgradeGoodsCommodityCode: '',
upgradeGoodsCode: '',
specification: '',
stock: ''
},
IMG_URL, IMG_URL,
confirmInfo: {}, confirmInfo: {},
goodsObj: [ goodsObj: [
...@@ -71,6 +78,47 @@ Page({ ...@@ -71,6 +78,47 @@ Page({
* 生命周期函数--监听页面显示 * 生命周期函数--监听页面显示
*/ */
onShow() {}, onShow() {},
// 打开弹窗
openInventoryPopup(e) {
console.log(e.target.dataset)
let {inventory:{
upgradeGoodsCommodityCode,
upgradeGoodsCode,
specification,
stock
}} = e.target.dataset
const inventoryData ={
upgradeGoodsCommodityCode,
upgradeGoodsCode,
specification,
stock
}
this.setData({
showInventory: true,
inventoryData
});
},
// 打开物料弹窗
openInventory(e){
const inventoryData=e.detail
this.setData({
showInventory: true,
inventoryData
});
},
// 关闭弹窗
closeInventoryPopup() {
this.setData({
showInventory: false
});
},
// 监听弹窗关闭事件
onInventoryClose() {
this.setData({
showInventory: false
});
},
// 获取人员权限 // 获取人员权限
getStaffPermissions() { getStaffPermissions() {
......
...@@ -32,9 +32,13 @@ ...@@ -32,9 +32,13 @@
<block wx:if="{{ !editGoodsFlag }}"> <block wx:if="{{ !editGoodsFlag }}">
<view class="goods-box" wx:if="{{ confirmInfo.subOrderList.length }}"> <view class="goods-box" wx:if="{{ confirmInfo.subOrderList.length }}">
<view class="goods-item" wx:for="{{ confirmInfo.subOrderList }}" wx:key="index"> <view class="goods-item" wx:for="{{ confirmInfo.subOrderList }}" wx:key="index">
<view class="goods-name text-hide"> <view class="goods-text">
{{filter.replaceItemText(item.upgradeGoodsAlias) ||filter.replaceItemText(item.upgradeGoodsName) || item.packageName||''}} <view class="goods-name text-hide">
{{filter.replaceItemText(item.upgradeGoodsAlias) ||filter.replaceItemText(item.upgradeGoodsName) || item.packageName||''}}
</view>
<view class="inventory" bindtap="openInventoryPopup" data-inventory="{{item}}">库存{{item.stock}}</view>
</view> </view>
<view class="count">x{{item.number}}</view> <view class="count">x{{item.number}}</view>
</view> </view>
</view> </view>
...@@ -60,17 +64,7 @@ ...@@ -60,17 +64,7 @@
<view class="title"> <view class="title">
<view class="box">施工单信息</view> <view class="box">施工单信息</view>
</view> </view>
<gl-cell <gl-cell border valueAlign="right" label="主技师" requiredAfter labelWidth="var(--fontSize140)" required haveArrow bindclick="showPopup" placeholder="请选择">
border
valueAlign="right"
label="主技师"
requiredAfter
labelWidth="var(--fontSize140)"
required
haveArrow
bindclick="showPopup"
placeholder="请选择"
>
<block wx:if="{{ mainSelected.length }}"> <block wx:if="{{ mainSelected.length }}">
<view class="techic-value text-hide"> <view class="techic-value text-hide">
{{mainSelected[0] && mainSelected[0].staffName}} {{mainSelected[0] && mainSelected[0].staffName}}
...@@ -78,16 +72,7 @@ ...@@ -78,16 +72,7 @@
</view> </view>
</block> </block>
</gl-cell> </gl-cell>
<gl-cell <gl-cell border valueAlign="right" label="副手技师" labelWidth="var(--fontSize140)" haveArrow bindclick="showPopup" data-type="deputy" placeholder="请选择">
border
valueAlign="right"
label="副手技师"
labelWidth="var(--fontSize140)"
haveArrow
bindclick="showPopup"
data-type="deputy"
placeholder="请选择"
>
<block wx:if="{{ deputySelected.length }}"> <block wx:if="{{ deputySelected.length }}">
<view class="techic-value text-hide"> <view class="techic-value text-hide">
<view class="text-hide" wx:if="{{ deputySelected[0] }}"> <view class="text-hide" wx:if="{{ deputySelected[0] }}">
...@@ -142,13 +127,7 @@ ...@@ -142,13 +127,7 @@
<view class="title text-hide">{{item.title}}</view> <view class="title text-hide">{{item.title}}</view>
<block wx:for="{{ item.detailList }}" wx:key="sindex" wx:for-item="i" wx:for-index="sindex"> <block wx:for="{{ item.detailList }}" wx:key="sindex" wx:for-item="i" wx:for-index="sindex">
<view class="service-item edit-item"> <view class="service-item edit-item">
<image <image bindtap="handleDelServices" data-index="{{ index }}" data-sindex="{{ sindex }}" src="{{ IMG_URL }}repair-order/del-goods.png" mode="" />
bindtap="handleDelServices"
data-index="{{ index }}"
data-sindex="{{ sindex }}"
src="{{ IMG_URL }}repair-order/del-goods.png"
mode=""
/>
<view style="flex: 1;display: flex;align-items: center;justify-content: space-between;"> <view style="flex: 1;display: flex;align-items: center;justify-content: space-between;">
<view class="left"> <view class="left">
<view class="name">{{i.serviceItemsName}}</view> <view class="name">{{i.serviceItemsName}}</view>
...@@ -171,37 +150,12 @@ ...@@ -171,37 +150,12 @@
</view> </view>
</view> </view>
</view> </view>
<view <view class="btns {{ isFullSucreen?'isFullSucreen-btn':'' }}" wx:if="{{ filter.btnPermissions(userPermissions, 'SHIGONGQUEREN') }}">
class="btns {{ isFullSucreen?'isFullSucreen-btn':'' }}"
wx:if="{{ filter.btnPermissions(userPermissions, 'SHIGONGQUEREN') }}"
>
<view class="btns-con"> <view class="btns-con">
<view class="confirm text-center" bindtap="submit">提交电子施工单</view> <view class="confirm text-center" bindtap="submit">提交电子施工单</view>
</view> </view>
</view> </view>
<relate-goods-popup
show="{{ relateGoodsVisable }}"
goodsList="{{ goodsList }}"
bindconfirm="handelRelateGoodsConfirm"
selected="{{ editGoodsList }}"
bindcancel="handelRelateGoodsCancel"
baseConfigData="{{ baseConfigData }}"
></relate-goods-popup>
<technician-select-popup
show="{{ artificerSelectPopup }}"
title="选择技师"
copyArtificerList="{{ artificerList }}"
multiple="{{ technicianMultiple }}"
artificerSelectObj="{{ technicianMultiple ? deputySelected : mainSelected }}"
disabledSelectObj="{{ technicianMultiple ? mainSelected : deputySelected }}"
bindconfirm="changeArtificer"
bindcancel="cancelTechnician"
deputyFlag="{{ technicianMultiple }}"
/>
<select-service-popup
show="{{ selectServiceVisable }}"
bindconfirm="handleSelectServiceConfirm"
selectGoodsList="{{ confirmInfo.subOrderList }}"
selected="{{ editServicesList }}"
bindcancel="handleSelectServiceCancel"
></select-service-popup>
\ No newline at end of file \ No newline at end of file
<relate-goods-popup show="{{ relateGoodsVisable }}" goodsList="{{ goodsList }}" bindconfirm="handelRelateGoodsConfirm" selected="{{ editGoodsList }}" bindcancel="handelRelateGoodsCancel" baseConfigData="{{ baseConfigData }}" bind:openInventory="openInventory"></relate-goods-popup>
<technician-select-popup show="{{ artificerSelectPopup }}" title="选择技师" copyArtificerList="{{ artificerList }}" multiple="{{ technicianMultiple }}" artificerSelectObj="{{ technicianMultiple ? deputySelected : mainSelected }}" disabledSelectObj="{{ technicianMultiple ? mainSelected : deputySelected }}" bindconfirm="changeArtificer" bindcancel="cancelTechnician" deputyFlag="{{ technicianMultiple }}" />
<select-service-popup show="{{ selectServiceVisable }}" bindconfirm="handleSelectServiceConfirm" selectGoodsList="{{ confirmInfo.subOrderList }}" selected="{{ editServicesList }}" bindcancel="handleSelectServiceCancel"></select-service-popup>
<inventory-info show="{{showInventory}}" inventory-data="{{inventoryData}}" title="库存信息" bind:close="onInventoryClose" />
\ No newline at end of file \ No newline at end of file
...@@ -13,7 +13,8 @@ Page({ ...@@ -13,7 +13,8 @@ Page({
data: { data: {
IMG_URL, IMG_URL,
detailInfo: {}, detailInfo: {},
reworkVisible: false, reworkVisible: false,
showInventory:false,
orderObj: [ orderObj: [
{ {
label: '施工单编号', label: '施工单编号',
...@@ -142,7 +143,13 @@ Page({ ...@@ -142,7 +143,13 @@ Page({
technicianMultiple: false, technicianMultiple: false,
mainSelected: [], mainSelected: [],
deputySelected: [], deputySelected: [],
artificerList: [] artificerList: [],
inventoryData: {
upgradeGoodsCommodityCode: '',
upgradeGoodsCode: '',
specification: '',
stock: ''
},
}, },
onRoute(options) { onRoute(options) {
...@@ -188,6 +195,47 @@ Page({ ...@@ -188,6 +195,47 @@ Page({
* 生命周期函数--监听页面显示 * 生命周期函数--监听页面显示
*/ */
onShow() {}, onShow() {},
// 打开弹窗
openInventoryPopup(e) {
console.log(e.target.dataset)
let {inventory:{
upgradeGoodsCommodityCode,
upgradeGoodsCode,
specification,
stock
}} = e.target.dataset
const inventoryData ={
upgradeGoodsCommodityCode,
upgradeGoodsCode,
specification,
stock
}
this.setData({
showInventory: true,
inventoryData
});
},
// 打开物料弹窗
openInventory(e){
const inventoryData=e.detail
this.setData({
showInventory: true,
inventoryData
});
},
// 关闭弹窗
closeInventoryPopup() {
this.setData({
showInventory: false
});
},
// 监听弹窗关闭事件
onInventoryClose() {
this.setData({
showInventory: false
});
},
// 人员权限 // 人员权限
getStaffPermissions() { getStaffPermissions() {
let { userInfo } = this.data let { userInfo } = this.data
......
...@@ -43,6 +43,22 @@ Component({ ...@@ -43,6 +43,22 @@ Component({
* 组件的方法列表 * 组件的方法列表
*/ */
methods: { methods: {
openInventoryPopup(e){
console.log(e)
let {inventory:{
upgradeGoodsCommodityCode,
upgradeGoodsCode,
specification,
stock
}} = e.target.dataset
const inventoryData ={
upgradeGoodsCommodityCode,
upgradeGoodsCode,
specification,
stock
}
this.triggerEvent('openInventory', inventoryData)
},
navto(e) { navto(e) {
let { item } = e.currentTarget.dataset let { item } = e.currentTarget.dataset
console.log(item, 'item') console.log(item, 'item')
...@@ -67,6 +83,18 @@ Component({ ...@@ -67,6 +83,18 @@ Component({
let listConstruction = res.data.map(item => { let listConstruction = res.data.map(item => {
item.subGoodsName = item.subOrderList item.subGoodsName = item.subOrderList
.map(sub => sub.upgradeGoodsName) .map(sub => sub.upgradeGoodsName)
.join('/')
item.upgradeGoodsCommodityCode = item.subOrderList
.map(sub => sub.upgradeGoodsCommodityCode)
.join('/')
item.upgradeGoodsCode = item.subOrderList
.map(sub => sub.upgradeGoodsCode)
.join('/')
item.specification = item.subOrderList
.map(sub => sub.specification)
.join('/')
item.stock = item.subOrderList
.map(sub => sub.stock)
.join('/') .join('/')
item.mainTechnician = item.mainTechnicianList item.mainTechnician = item.mainTechnicianList
.map(sub => sub.technicianName) .map(sub => sub.technicianName)
......
/* components/SelectInvoiceModal/SelectInvoiceModal.wxss */ /* components/SelectInvoiceModal/SelectInvoiceModal.wxss */
.modatcontent { .modatcontent {
box-sizing: border-box; box-sizing: border-box;
// margin: var(--fontSize48) 0 0; // margin: var(--fontSize48) 0 0;
// max-height: 600rpx; // max-height: 600rpx;
// overflow-y: scroll; // overflow-y: scroll;
margin: 20rpx 0; margin: 20rpx 0;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
.itemContent { .itemContent {
box-sizing: border-box; box-sizing: border-box;
display: flex; display: flex;
align-items: center; align-items: center;
border-bottom: 1rpx solid #f2f2f3; border-bottom: 1rpx solid #f2f2f3;
// margin-top: 24rpx; // margin-top: 24rpx;
margin: 24rpx 2rpx 0; margin: 24rpx 2rpx 0;
} }
.item { .item {
display: flex; display: flex;
align-items: center; align-items: center;
} }
.itembox { .itembox {
box-sizing: border-box; box-sizing: border-box;
padding: 0 48rpx; padding: 24rpx 48rpx;
height: 120rpx; // height: 120rpx;
display: flex; display: flex;
// align-items: center; // align-items: center;
flex-direction: column; flex-direction: column;
.subName { .subName {
overflow: hidden; //一定要写 overflow: hidden; //一定要写
text-overflow: ellipsis; //超出省略号 text-overflow: ellipsis; //超出省略号
display: -webkit-box; //一定要写 display: -webkit-box; //一定要写
-webkit-line-clamp: 1; //控制行数 -webkit-line-clamp: 1; //控制行数
-webkit-box-orient: vertical; //一定要写 -webkit-box-orient: vertical; //一定要写
width: 480rpx; width: 480rpx;
height: 40rpx; height: 40rpx;
margin-bottom: 18rpx; margin-bottom: 18rpx;
} }
.part { .part {
display: flex; display: flex;
align-items: center; align-items: center;
.position { .position {
font-size: 24rpx; max-width: 200rpx;
color: #999EA8; font-size: 24rpx;
margin-right: 16rpx; color: #999EA8;
} margin-right: 16rpx;
overflow: hidden; //一定要写
.statusBox { text-overflow: ellipsis; //超出省略号
font-weight: 500; display: -webkit-box; //一定要写
font-size: 18rpx; -webkit-line-clamp: 2; //控制行数
width: 67rpx; -webkit-box-orient: vertical; //一定要写
height: 26rpx; }
color: #35C376;
border: 1.6rpx solid #35C376; .statusBox {
border-radius: 4rpx; font-weight: 500;
line-height: 26rpx; font-size: 18rpx;
text-align: center; width: 67rpx;
} height: 26rpx;
color: #35C376;
.wait { border: 1.6rpx solid #35C376;
color: #FF9D0A; border-radius: 4rpx;
border: 1.6rpx solid #FF9D0A; line-height: 26rpx;
text-align: center;
} }
}
.wait {
} color: #FF9D0A;
border: 1.6rpx solid #FF9D0A;
.itembox+.itembox {
border-top: 1rpx solid #EFF0F2;
} }
.right { .inventory {
.arrow { max-width: 200rpx;
display: inline-block; margin-left: 20rpx;
width: 32rpx; font-size: 24rpx;
height: 32rpx; color: #347bff;
} white-space: nowrap;
} overflow: hidden;
text-overflow: ellipsis;
}
}
}
.itembox+.itembox {
border-top: 1rpx solid #EFF0F2;
}
.right {
.arrow {
display: inline-block;
width: 32rpx;
height: 32rpx;
}
}
} }
.modal { .modal {
.icon { .icon {
width: 96rpx; width: 96rpx;
height: 96rpx; height: 96rpx;
margin-right: 30rpx; margin-right: 30rpx;
} }
.modalbox { .modalbox {
display: flex; display: flex;
align-items: center; align-items: center;
box-sizing: border-box; box-sizing: border-box;
width: 522rpx; width: 522rpx;
height: 136rpx; height: 136rpx;
background: #F7F8FA; background: #F7F8FA;
border-radius: 8rpx; border-radius: 8rpx;
font-family: PingFangSC-Medium; font-family: PingFangSC-Medium;
font-weight: 500; font-weight: 500;
font-size: 28rpx; font-size: 28rpx;
color: #292D33; color: #292D33;
padding-left: 24rpx; padding-left: 24rpx;
margin: 0 auto; margin: 0 auto;
&+.modalbox { &+.modalbox {
margin-top: 16rpx; margin-top: 16rpx;
} }
.txt { .txt {
font-size: 24rpx; font-size: 24rpx;
} }
} }
.act { .act {
background: #347bff1a; background: #347bff1a;
border: 2rpx solid #347BFF; border: 2rpx solid #347BFF;
color: #3582EE; color: #3582EE;
} }
} }
.btnbox { .btnbox {
// margin-top: 32rpx;
display: flex;
justify-content: center;
.btn {
width: 250rpx;
height: 100rpx;
line-height: 100rpx;
text-align: center;
border-radius: 12rpx;
font-size: 32rpx;
// margin-bottom: 48rpx;
}
.cancel {
background: #FFFFFF;
// border: 2rpx solid #DEE0E3;
color: #222222;
}
.confirm {
color: #FFFFFF;
background: #347BFF;
margin-left: 24rpx;
}
}
\ No newline at end of file \ No newline at end of file
// margin-top: 32rpx;
display: flex;
justify-content: center;
.btn {
width: 250rpx;
height: 100rpx;
line-height: 100rpx;
text-align: center;
border-radius: 12rpx;
font-size: 32rpx;
// margin-bottom: 48rpx;
}
.cancel {
background: #FFFFFF;
// border: 2rpx solid #DEE0E3;
color: #222222;
}
.confirm {
color: #FFFFFF;
background: #347BFF;
margin-left: 24rpx;
}
}
<!--components/SelectInvoiceModal/SelectInvoiceModal.wxml--> <!--components/SelectInvoiceModal/SelectInvoiceModal.wxml-->
<!-- btns="{{ ['取消','确定'] }}" --> <!-- btns="{{ ['取消','确定'] }}" -->
<modal id="modal" class="modal" custom="true" btns="{{ [] }}" maskEnable="{{ false }}" tapTitle="查看客户施工单"> <modal id="modal" class="modal" custom="true" btns="{{ [] }}" maskEnable="{{ false }}" tapTitle="查看客户施工单">
<scroll-view style="height: 200px;padding: 15px 0 10px;" scroll-y> <scroll-view style="height: 200px;padding: 15px 0 10px;" scroll-y>
<view class="modatcontent"> <view class="modatcontent">
<view wx:for="{{ constructionList }}" wx:for-item="item" wx:for-index="index" class="item" wx:key="index"> <view wx:for="{{ constructionList }}" wx:for-item="item" wx:for-index="index" class="item" wx:key="index">
<!-- bind:tap="handleDetail" --> <!-- bind:tap="handleDetail" -->
<view class="itembox" bind:tap="navto" data-item="{{item}}"> <view class="itembox" bind:tap="navto" data-item="{{item}}">
<view class="subName">{{item.subGoodsName}}</view> <view class="subName">{{item.subGoodsName}}</view>
<view class="part"> <view class="part">
<view class="position">{{item.mainTechnician}}</view> <view class="position">{{item.mainTechnician}}</view>
<view class="statusBox" wx:if="{{ item.constructionStatus == 1||item.constructionStatus ==2 }}">已施工</view> <view class="statusBox" wx:if="{{ item.constructionStatus == 1||item.constructionStatus ==2 }}">已施工</view>
<view class="statusBox wait" wx:if="{{ item.constructionStatus == 0 }}">待施工</view> <view class="statusBox wait" wx:if="{{ item.constructionStatus == 0 }}">待施工</view>
</view> <!-- <view class="inventory">库存1020.00米/件</view>
</view> <view class="inventory" catch:tap="openInventoryPopup" data-inventory="{{item}}">库存{{item.stock}}</view> -->
<view class="right"> </view>
<image class="arrow" src="/components/images/arrow-x.png"></image> </view>
</view> <view class="right">
</view> <image class="arrow" src="/components/images/arrow-x.png"></image>
</view> </view>
</scroll-view> </view>
</view>
</scroll-view>
<view class="btnbox"> <view class="btnbox">
<view class="btn cancel" bind:tap="handleCancel">关闭</view> <view class="btn cancel" bind:tap="handleCancel">关闭</view>
<!-- <view class="btn confirm" bind:tap="handleConfirm">下一步</view> --> <!-- <view class="btn confirm" bind:tap="handleConfirm">下一步</view> -->
</view> </view>
</modal> </modal>
\ No newline at end of file \ No newline at end of file
...@@ -37,6 +37,22 @@ Component({ ...@@ -37,6 +37,22 @@ Component({
* 组件的方法列表 * 组件的方法列表
*/ */
methods: { methods: {
openInventoryPopup(e){
console.log(e)
let {inventory:{
upgradeGoodsCommodityCode,
upgradeGoodsCode,
specification,
stock
}} = e.target.dataset
const inventoryData ={
upgradeGoodsCommodityCode,
upgradeGoodsCode,
specification,
stock
}
this.triggerEvent('openInventory', inventoryData)
},
selectType(e) { selectType(e) {
let { type } = e.currentTarget.dataset let { type } = e.currentTarget.dataset
this.setData({ this.setData({
...@@ -135,7 +151,11 @@ Component({ ...@@ -135,7 +151,11 @@ Component({
subOrderCode: val.subOrderCode, subOrderCode: val.subOrderCode,
upgradeGoodsId: val.upgradeGoodsId, upgradeGoodsId: val.upgradeGoodsId,
upgradeGoodsName: val.upgradeGoodsName, upgradeGoodsName: val.upgradeGoodsName,
constructionFlag: val.constructionFlag constructionFlag: val.constructionFlag,
upgradeGoodsCommodityCode:val.upgradeGoodsCommodityCode,
upgradeGoodsCode:val.upgradeGoodsCode,
specification:val.specification,
stock:val.stock
} }
}) })
let params = { let params = {
......
/* components/SelectInvoiceModal/SelectInvoiceModal.wxss */ /* components/SelectInvoiceModal/SelectInvoiceModal.wxss */
.modatcontent { .modatcontent {
box-sizing: border-box; box-sizing: border-box;
// margin: var(--fontSize48) 0 0; // margin: var(--fontSize48) 0 0;
// max-height: 600rpx; // max-height: 600rpx;
// height: 600rxp; // height: 600rxp;
overflow-y: auto; overflow-y: auto;
margin: 20rpx 0; margin: 20rpx 0;
.itembox { .itembox {
box-sizing: border-box; box-sizing: border-box;
padding: 0 48rpx; padding: 16rpx 48rpx;
height: 120rpx; // height: 120rpx;
display: flex; display: flex;
align-items: center; align-items: center;
.subName { .item-text {
display: inline-block; width: 300rpx;
overflow: hidden; //一定要写 }
text-overflow: ellipsis; //超出省略号
display: -webkit-box; //一定要写 .inventory {
-webkit-line-clamp: 2; //控制行数 width: 100%;
-webkit-box-orient: vertical; //一定要写 font-size: 24rpx;
width: 300rpx; color: #347bff;
// height: 90rpx; display: inline-block;
line-height: 45rpx; overflow: hidden; //一定要写
font-size: 28rpx; text-overflow: ellipsis; //超出省略号
color: #292D33; display: -webkit-box; //一定要写
} -webkit-line-clamp: 2; //控制行数
-webkit-box-orient: vertical; //一定要写
.checked_img { }
display: flex;
align-items: center; .subName {
margin-left: 20rpx; width: 100%;
display: inline-block;
.checked { overflow: hidden; //一定要写
display: flex; text-overflow: ellipsis; //超出省略号
align-items: center; display: -webkit-box; //一定要写
font-size: 28rpx; -webkit-line-clamp: 2; //控制行数
color: #292D33; -webkit-box-orient: vertical; //一定要写
}
// height: 90rpx;
image { line-height: 45rpx;
display: inline-block; font-size: 28rpx;
width: 32rpx; color: #292D33;
height: 32rpx; }
flex-shrink: 0;
margin-right: 20rpx; .checked_img {
} display: flex;
align-items: center;
.nocheck { margin-left: 20rpx;
margin-left: 48rpx;
} .checked {
display: flex;
} align-items: center;
} font-size: 28rpx;
color: #292D33;
.itembox+.itembox { }
border-top: 1rpx solid #EFF0F2;
} image {
display: inline-block;
width: 32rpx;
height: 32rpx;
flex-shrink: 0;
margin-right: 20rpx;
}
.nocheck {
margin-left: 48rpx;
}
}
}
.itembox+.itembox {
border-top: 1rpx solid #EFF0F2;
}
} }
.modal { .modal {
.icon { .icon {
width: 96rpx; width: 96rpx;
height: 96rpx; height: 96rpx;
margin-right: 30rpx; margin-right: 30rpx;
} }
.modalbox { .modalbox {
display: flex; display: flex;
align-items: center; align-items: center;
box-sizing: border-box; box-sizing: border-box;
width: 522rpx; width: 522rpx;
height: 136rpx; height: 136rpx;
background: #F7F8FA; background: #F7F8FA;
border-radius: 8rpx; border-radius: 8rpx;
font-family: PingFangSC-Medium; font-family: PingFangSC-Medium;
font-weight: 500; font-weight: 500;
font-size: 28rpx; font-size: 28rpx;
color: #292D33; color: #292D33;
padding-left: 24rpx; padding-left: 24rpx;
margin: 0 auto; margin: 0 auto;
&+.modalbox { &+.modalbox {
margin-top: 16rpx; margin-top: 16rpx;
} }
.txt { .txt {
font-size: 24rpx; font-size: 24rpx;
} }
} }
.act { .act {
background: #347bff1a; background: #347bff1a;
border: 2rpx solid #347BFF; border: 2rpx solid #347BFF;
color: #3582EE; color: #3582EE;
} }
} }
.btnbox { .btnbox {
margin-top: 32rpx;
display: flex;
justify-content: center;
.btn {
width: 250rpx;
height: 80rpx;
line-height: 80rpx;
text-align: center;
border-radius: 12rpx;
font-size: 32rpx;
margin-bottom: 48rpx;
}
.cancel {
background: #FFFFFF;
border: 2rpx solid #DEE0E3;
color: #222222;
}
.confirm {
color: #FFFFFF;
background: #347BFF;
margin-left: 24rpx;
}
.disabled {
background: #D0D2D6;
color: #FFFFFF;
}
}
\ No newline at end of file \ No newline at end of file
margin-top: 32rpx;
display: flex;
justify-content: center;
.btn {
width: 250rpx;
height: 80rpx;
line-height: 80rpx;
text-align: center;
border-radius: 12rpx;
font-size: 32rpx;
margin-bottom: 48rpx;
}
.cancel {
background: #FFFFFF;
border: 2rpx solid #DEE0E3;
color: #222222;
}
.confirm {
color: #FFFFFF;
background: #347BFF;
margin-left: 24rpx;
}
.disabled {
background: #D0D2D6;
color: #FFFFFF;
}
}
...@@ -6,7 +6,13 @@ ...@@ -6,7 +6,13 @@
<view class="modatcontent"> <view class="modatcontent">
<block wx:for="{{ constructionList }}" wx:key="index"> <block wx:for="{{ constructionList }}" wx:key="index">
<view class="itembox"> <view class="itembox">
<text class="subName">{{item.upgradeGoodsName}}</text> <view class="item-text">
<text class="subName">{{item.upgradeGoodsName}}</text>
<!-- <view class="inventory">库存1020.00米/件</view> -->
<view class="inventory" catch:tap="openInventoryPopup" data-inventory="{{item}}">库存{{item.stock}}</view>
</view>
<view class="checked_img"> <view class="checked_img">
<!-- <block wx:if="{{multiple}}"> --> <!-- <block wx:if="{{multiple}}"> -->
<view class="checked" bind:tap="switchValue" data-index="{{ index }}" data-value="1"> <view class="checked" bind:tap="switchValue" data-index="{{ index }}" data-value="1">
......
...@@ -35,6 +35,22 @@ Component({ ...@@ -35,6 +35,22 @@ Component({
* 组件的方法列表 * 组件的方法列表
*/ */
methods: { methods: {
openInventoryPopup(e){
console.log(e)
let {inventory:{
upgradeGoodsCommodityCode,
upgradeGoodsCode,
specification,
stock
}} = e.target.dataset
const inventoryData ={
upgradeGoodsCommodityCode,
upgradeGoodsCode,
specification,
stock
}
this.triggerEvent('openInventory', inventoryData)
},
choose(e) { choose(e) {
let { item } = e.currentTarget.dataset let { item } = e.currentTarget.dataset
let { goodsList } = this.data let { goodsList } = this.data
......
/* tabRepairOrder/components/relateGoodsPop/index.wxss */ /* tabRepairOrder/components/relateGoodsPop/index.wxss */
.tips { .tips {
background: #FDECE9; background: #FDECE9;
font-size: 28rpx; font-size: 28rpx;
color: #F24724; color: #F24724;
line-height: 40rpx; line-height: 40rpx;
padding: 16rpx 40rpx; padding: 16rpx 40rpx;
margin-left: calc(-1 * var(--fontSize32)); margin-left: calc(-1 * var(--fontSize32));
width: 100%; width: 100%;
} }
.goods-content { .goods-content {
width: calc(100% + var(--fontSize64)); width: calc(100% + var(--fontSize64));
height: calc(100% - var(--fontSize90)); height: calc(100% - var(--fontSize90));
margin-left: calc(-1 * var(--fontSize32)); margin-left: calc(-1 * var(--fontSize32));
.content { .content {
height: calc(100% - var(--fontSize104)); height: calc(100% - var(--fontSize104));
.box { .box {
border-bottom: var(--fontSize2) solid #EBEDF0; border-bottom: var(--fontSize2) solid #EBEDF0;
.itemBox { .itemBox {
display: flex; display: flex;
align-items: center; align-items: center;
.choose { .choose {
width: var(--fontSize32); width: var(--fontSize32);
height: var(--fontSize32); height: var(--fontSize32);
margin: 0 var(--fontSize32); margin: 0 var(--fontSize32);
} }
.item { .item-box {
flex: 1; padding: 20rpx 0;
justify-content: space-between; padding-right: var(--fontSize32);
padding-right: var(--fontSize32); width: calc(100% - var(--fontSize130));
width: calc(100% - var(--fontSize130)); border-top: var(--fontSize2) solid #EBEDF0;
border-top: var(--fontSize2) solid #EBEDF0; }
height: var(--fontSize84);
display: flex; .item {
align-items: center; flex: 1;
font-size: var(--fontSize28); justify-content: space-between;
color: #888888; display: flex;
position: relative; align-items: center;
font-size: var(--fontSize28);
.labelWidth { color: #888888;
width: calc(100% - var(--fontSize180)); position: relative;
}
.labelWidth {
.value { width: calc(100% - var(--fontSize180));
width: 100%; }
display: flex;
justify-content: space-between; .value {
width: 100%;
.name { display: flex;
max-width: 85%; justify-content: space-between;
width: calc(100vw - var(--fontSize100));
color: #292D33; .name {
} max-width: 85%;
width: calc(100vw - var(--fontSize100));
.text-hide { color: #292D33;
white-space: nowrap; }
overflow: hidden;
text-overflow: ellipsis; .text-hide {
} white-space: nowrap;
} overflow: hidden;
} text-overflow: ellipsis;
} }
} }
}
.selected-box { }
text-align: center;
font-size: var(--fontSize28); .inventory {
color: #888888; margin-top: 4px;
margin-top: var(--fontSize30); max-width: 85%;
font-size: 24rpx;
text { color: #347bff;
color: #347BFF; white-space: nowrap;
} overflow: hidden;
} text-overflow: ellipsis;
}
}
}
}
.selected-box {
text-align: center;
font-size: var(--fontSize28);
color: #888888;
margin-top: var(--fontSize30);
text {
color: #347BFF;
}
}
} }
.nothing { .nothing {
text-align: center;
margin-top: 30rpx;
}
\ No newline at end of file \ No newline at end of file
text-align: center;
margin-top: 30rpx;
}
<!--tabRepairOrder/components/relateGoodsPop/index.wxml--> <!--tabRepairOrder/components/relateGoodsPop/index.wxml-->
<wxs src="../../index.wxs" module="filter" /> <wxs src="../../index.wxs" module="filter" />
<popup show="{{show}}" title="选择关联商品" bindconfirm="confirm" height="60%" bindcancel="cancel"> <popup show="{{show}}" title="选择关联商品" bindconfirm="confirm" height="60%" bindcancel="cancel">
<view class="tips"> <view class="tips">
选定当前施工单的商品,未选的商品将自动创建第二笔施工单,可由不同技师负责施工 选定当前施工单的商品,未选的商品将自动创建第二笔施工单,可由不同技师负责施工
</view> </view>
<view class="goods-content"> <view class="goods-content">
<scroll-view class="content" scroll-y show-scrollbar="{{false}}"> <scroll-view class="content" scroll-y show-scrollbar="{{false}}">
<block wx:if="{{goodsList.length > 0}}"> <block wx:if="{{goodsList.length > 0}}">
<view class="box"> <view class="box">
<block wx:for="{{goodsList}}" wx:key="ind" wx:for-index="ind" wx:for-item="i"> <block wx:for="{{goodsList}}" wx:key="ind" wx:for-index="ind" wx:for-item="i">
<view class="item-wrap"> <view class="item-wrap">
<view class="itemBox"> <view class="itemBox">
<view class="choose" catchtap="choose" data-ind="{{ind}}" data-item="{{i}}"> <view class="choose" catchtap="choose" data-ind="{{ind}}" data-item="{{i}}">
<image src="{{i.active ? '../../../components/images/radio.png' : '../../../components/images/radio_icon.png'}}" /> <image src="{{i.active ? '../../../components/images/radio.png' : '../../../components/images/radio_icon.png'}}" />
</view> </view>
<view class="item"> <view class="item-box">
<view class="value {{i.active?'labelWidth':''}}" catchtap="choose" data-ind="{{ind}}" data-item="{{i}}"> <view class="item">
<view class="name text-hide {{i.active?'textWidth':''}}"> <view class="value {{i.active?'labelWidth':''}}" catchtap="choose" data-ind="{{ind}}" data-item="{{i}}">
<text>{{filter.replaceItemText(i.goodsAlias) ||filter.replaceItemText(i.upgradeGoodsName) || filter.replaceItemText(i.goodsName)}}</text> <view class="name text-hide {{i.active?'textWidth':''}}">
<text wx:if="{{i.position && (i.goodsType == 1 || i.goodsType == baseConfigData.selfBuildFilmType)}}">{{'「' + i.positionStr+'」'}}</text> <text>{{filter.replaceItemText(i.goodsAlias) ||filter.replaceItemText(i.upgradeGoodsName) || filter.replaceItemText(i.goodsName)}}</text>
<!-- <text class="warning_text" wx:if="{{!i.goods.merchantGoodsPosition && (i.goods.goodsInfo.goodsType == 1 || i.goods.goodsInfo.goodsType == baseConfigData.selfBuildFilmType)}}">无部位</text> --> <text wx:if="{{i.position && (i.goodsType == 1 || i.goodsType == baseConfigData.selfBuildFilmType)}}">{{'「' + i.positionStr+'」'}}</text>
</view> <!-- <text class="warning_text" wx:if="{{!i.goods.merchantGoodsPosition && (i.goods.goodsInfo.goodsType == 1 || i.goods.goodsInfo.goodsType == baseConfigData.selfBuildFilmType)}}">无部位</text> -->
</view> </view>
</view> </view>
</view>
</view> </view>
</block> <view class="inventory" catch:tap="openInventoryPopup" data-inventory="{{i}}">库存{{i.stock}}</view>
</view> </view>
</block>
<block wx:else> </view>
<view class="nothing">暂无数据</view> </view>
</block> </block>
</scroll-view> </view>
<view class="selected-box">已选商品 <text>{{filter.activeNum(goodsList)}}</text> 件</view> </block>
</view> <block wx:else>
<view class="nothing">暂无数据</view>
</block>
</scroll-view>
<view class="selected-box">已选商品 <text>{{filter.activeNum(goodsList)}}</text> 件</view>
</view>
</popup> </popup>
\ No newline at end of file \ No newline at end of file
...@@ -10,6 +10,13 @@ Page({ ...@@ -10,6 +10,13 @@ Page({
* 页面的初始数据 * 页面的初始数据
*/ */
data: { data: {
showInventory:false,
inventoryData: {
upgradeGoodsCommodityCode: '',
upgradeGoodsCode: '',
specification: '',
stock: ''
},
isFirst: true, isFirst: true,
subOrderRelationList: [{}], subOrderRelationList: [{}],
confirmInfo: { confirmInfo: {
...@@ -171,6 +178,40 @@ Page({ ...@@ -171,6 +178,40 @@ Page({
}, 1000) }, 1000)
}) })
}, },
// 监听弹窗关闭事件
onInventoryClose() {
this.setData({
showInventory: false
});
},
// 打开弹窗
openInventoryPopup(e) {
console.log(e.target.dataset)
let {inventory:{
upgradeGoodsCommodityCode,
upgradeGoodsCode,
specification,
stock
}} = e.target.dataset
const inventoryData ={
upgradeGoodsCommodityCode,
upgradeGoodsCode,
specification,
stock
}
this.setData({
showInventory: true,
inventoryData
});
},
// 打开物料弹窗
openInventory(e){
const inventoryData=e.detail
this.setData({
showInventory: true,
inventoryData
});
},
backup() { backup() {
let { orderCode } = this.data let { orderCode } = this.data
wx.$router.back({ orderCode }) wx.$router.back({ orderCode })
...@@ -447,7 +488,11 @@ Page({ ...@@ -447,7 +488,11 @@ Page({
subOrderCode: val.subOrderCode, subOrderCode: val.subOrderCode,
upgradeGoodsId: val.upgradeGoodsId, upgradeGoodsId: val.upgradeGoodsId,
upgradeGoodsName: val.upgradeGoodsName, upgradeGoodsName: val.upgradeGoodsName,
constructionFlag: val.constructionFlag, constructionFlag: val.constructionFlag,
upgradeGoodsCommodityCode:val.upgradeGoodsCommodityCode,
upgradeGoodsCode:val.upgradeGoodsCode,
specification:val.specification,
stock:val.stock,
number: val.number number: val.number
} }
}) })
......
...@@ -11,22 +11,16 @@ ...@@ -11,22 +11,16 @@
<view class="main {{ sublistVisible?'hildden':''}} {{ isFullSucreen?'isFullSucreen':'' }}"> <view class="main {{ sublistVisible?'hildden':''}} {{ isFullSucreen?'isFullSucreen':'' }}">
<view class="box"> <view class="box">
<view class="orderBox"> <view class="orderBox">
<gl-cell <gl-cell border="{{ false }}" valueAlign="right" label="选择商品并创建此施工单" labelWidth="var(--fontSize330)" haveArrow bindclick="relateGoods" data-show-name="selesBox" placeholder="请选择" disabled="{{ confirmInfo.relateGoodsDisabled }}"></gl-cell>
border="{{ false }}"
valueAlign="right"
label="选择商品并创建此施工单"
labelWidth="var(--fontSize330)"
haveArrow
bindclick="relateGoods"
data-show-name="selesBox"
placeholder="请选择"
disabled="{{ confirmInfo.relateGoodsDisabled }}"
></gl-cell>
<view class="goodsListCon" wx:if="{{ confirmInfo.subOrderList && confirmInfo.subOrderList.length }}"> <view class="goodsListCon" wx:if="{{ confirmInfo.subOrderList && confirmInfo.subOrderList.length }}">
<view class="goods" wx:for="{{ confirmInfo.subOrderList }}" wx:key="index"> <view class="goods" wx:for="{{ confirmInfo.subOrderList }}" wx:key="index">
<view class="left"> <view class="left">
<view class="dot"></view> <view class="dot"></view>
<view class="name">{{item.upgradeGoodsName}}</view> <view class="goods-text">
<view class="name">{{item.upgradeGoodsName}}</view>
<view class="inventory" catch:tap="openInventoryPopup" data-inventory="{{item}}">库存{{item.stock}}</view>
<!-- <view class="inventory">库存1020.00米/件</view> -->
</view>
</view> </view>
<view class="count">x{{item.number}}</view> <view class="count">x{{item.number}}</view>
</view> </view>
...@@ -35,17 +29,7 @@ ...@@ -35,17 +29,7 @@
</view> </view>
<view class="servies-content box"> <view class="servies-content box">
<view class="title">选择技师</view> <view class="title">选择技师</view>
<gl-cell <gl-cell border valueAlign="right" label="主技师" requiredAfter labelWidth="var(--fontSize140)" required haveArrow bindclick="showPopup" placeholder="请选择">
border
valueAlign="right"
label="主技师"
requiredAfter
labelWidth="var(--fontSize140)"
required
haveArrow
bindclick="showPopup"
placeholder="请选择"
>
<block wx:if="{{ mainSelected.length }}"> <block wx:if="{{ mainSelected.length }}">
<view class="techic-value text-hide"> <view class="techic-value text-hide">
{{mainSelected[0] && mainSelected[0].staffName}} {{mainSelected[0] && mainSelected[0].staffName}}
...@@ -53,16 +37,7 @@ ...@@ -53,16 +37,7 @@
</view> </view>
</block> </block>
</gl-cell> </gl-cell>
<gl-cell <gl-cell border valueAlign="right" label="副手技师" labelWidth="var(--fontSize140)" haveArrow bindclick="showPopup" data-type="deputy" placeholder="请选择">
border
valueAlign="right"
label="副手技师"
labelWidth="var(--fontSize140)"
haveArrow
bindclick="showPopup"
data-type="deputy"
placeholder="请选择"
>
<block wx:if="{{ deputySelected.length }}"> <block wx:if="{{ deputySelected.length }}">
<view class="techic-value text-hide"> <view class="techic-value text-hide">
<view class="text-hide" wx:if="{{ deputySelected[0] }}"> <view class="text-hide" wx:if="{{ deputySelected[0] }}">
...@@ -114,15 +89,7 @@ ...@@ -114,15 +89,7 @@
</view> </view>
</view> </view>
<view class="count-box" wx:if="{{ i.active }}"> <view class="count-box" wx:if="{{ i.active }}">
<input <input type="number" class="count-input" value="{{ i.useNum }}" maxlength="2" bindblur="handleCountBlur" bindinput="handleCountInput" data-target="{{ i }}" />
type="number"
class="count-input"
value="{{ i.useNum }}"
maxlength="2"
bindblur="handleCountBlur"
bindinput="handleCountInput"
data-target="{{ i }}"
/>
<text>个/件</text> <text>个/件</text>
</view> </view>
</view> </view>
...@@ -158,22 +125,6 @@ ...@@ -158,22 +125,6 @@
</view> </view>
</view> </view>
</block> </block>
<relate-goods-popup
show="{{ relateGoodsVisable }}"
goodsList="{{ goodsList }}"
bindconfirm="handelRelateGoodsConfirm"
selected="{{ editGoodsList }}"
bindcancel="handelRelateGoodsCancel"
baseConfigData="{{ baseConfigData }}"
></relate-goods-popup>
<technician-select-popup
show="{{ artificerSelectPopup }}"
title="选择技师"
copyArtificerList="{{ artificerList }}"
multiple="{{ technicianMultiple }}"
artificerSelectObj="{{ technicianMultiple ? deputySelected : mainSelected }}"
disabledSelectObj="{{ technicianMultiple ? mainSelected : deputySelected }}"
bindconfirm="changeArtificer"
bindcancel="cancelTechnician"
deputyFlag="{{ technicianMultiple }}"
/>
\ No newline at end of file \ No newline at end of file
<relate-goods-popup show="{{ relateGoodsVisable }}" goodsList="{{ goodsList }}" bindconfirm="handelRelateGoodsConfirm" selected="{{ editGoodsList }}" bindcancel="handelRelateGoodsCancel" baseConfigData="{{ baseConfigData }}" bind:openInventory="openInventory"></relate-goods-popup>
<technician-select-popup show="{{ artificerSelectPopup }}" title="选择技师" copyArtificerList="{{ artificerList }}" multiple="{{ technicianMultiple }}" artificerSelectObj="{{ technicianMultiple ? deputySelected : mainSelected }}" disabledSelectObj="{{ technicianMultiple ? mainSelected : deputySelected }}" bindconfirm="changeArtificer" bindcancel="cancelTechnician" deputyFlag="{{ technicianMultiple }}" />
<inventory-info show="{{showInventory}}" inventory-data="{{inventoryData}}" title="库存信息" bind:close="onInventoryClose" />
\ No newline at end of file \ No newline at end of file
...@@ -20,6 +20,13 @@ Page({ ...@@ -20,6 +20,13 @@ Page({
* 页面的初始数据 * 页面的初始数据
*/ */
data: { data: {
showInventory:false,
inventoryData: {
upgradeGoodsCommodityCode: '',
upgradeGoodsCode: '',
specification: '',
stock: ''
},
IMG_URL, IMG_URL,
...order_mixins.data, ...order_mixins.data,
selectType: 1, selectType: 1,
...@@ -56,6 +63,40 @@ Page({ ...@@ -56,6 +63,40 @@ Page({
sublistVisible: false, sublistVisible: false,
constructionVisible: false constructionVisible: false
}, },
// 监听弹窗关闭事件
onInventoryClose() {
this.setData({
showInventory: false
});
},
// 打开弹窗
openInventoryPopup(e) {
console.log(e.target.dataset)
let {inventory:{
upgradeGoodsCommodityCode,
upgradeGoodsCode,
specification,
stock
}} = e.target.dataset
const inventoryData ={
upgradeGoodsCommodityCode,
upgradeGoodsCode,
specification,
stock
}
this.setData({
showInventory: true,
inventoryData
});
},
// 打开物料弹窗
openInventory(e){
const inventoryData=e.detail
this.setData({
showInventory: true,
inventoryData
});
},
sublistCancel() { sublistCancel() {
this.setData( this.setData(
{ {
......
...@@ -25,9 +25,7 @@ ...@@ -25,9 +25,7 @@
<view class="box goodsOrderApplyStatus" wx:if="{{ orderInfo.goodsOrderApplyStatus }}"> <view class="box goodsOrderApplyStatus" wx:if="{{ orderInfo.goodsOrderApplyStatus }}">
<view class="title" style="display: flex;justify-content: space-between;align-items: center;"> <view class="title" style="display: flex;justify-content: space-between;align-items: center;">
<text>审批</text> <text>审批</text>
<view <view class="approval-tag {{ orderInfo.goodsOrderApplyStatus==3?'success':orderInfo.goodsOrderApplyStatus==4?'error':'warning' }}">{{orderInfo.goodsOrderApplyStatus==3?'审批通过':orderInfo.goodsOrderApplyStatus==4?'审批驳回':'审批中'}}</view>
class="approval-tag {{ orderInfo.goodsOrderApplyStatus==3?'success':orderInfo.goodsOrderApplyStatus==4?'error':'warning' }}"
>{{orderInfo.goodsOrderApplyStatus==3?'审批通过':orderInfo.goodsOrderApplyStatus==4?'审批驳回':'审批中'}}</view>
</view> </view>
<block wx:if="{{ orderInfo.goodsOrderApplyStatus==3 }}"> <block wx:if="{{ orderInfo.goodsOrderApplyStatus==3 }}">
<view class="approval-info"> <view class="approval-info">
...@@ -117,9 +115,7 @@ ...@@ -117,9 +115,7 @@
<view class="price">¥{{item.finalPrice}}</view> <view class="price">¥{{item.finalPrice}}</view>
</view> </view>
<view class="subItem_box"> <view class="subItem_box">
<view <view style="{{ !orderInfo.isOpenArtificer || !item.upgradeGoodsPosition ? 'display: flex; justify-content: space-between; width: 100%;' : 'display: flex;' }}">
style="{{ !orderInfo.isOpenArtificer || !item.upgradeGoodsPosition ? 'display: flex; justify-content: space-between; width: 100%;' : 'display: flex;' }}"
>
<!-- 太阳膜类展示部位 精品类展示类目名 --> <!-- 太阳膜类展示部位 精品类展示类目名 -->
<view class="position"> <view class="position">
{{item.positionStr || item.upgradeGoodsTypeName}} {{item.positionStr || item.upgradeGoodsTypeName}}
...@@ -146,10 +142,7 @@ ...@@ -146,10 +142,7 @@
<view class="label icon"> <view class="label icon">
<image src="../../images/voucher_icon.png" mode="" /> <image src="../../images/voucher_icon.png" mode="" />
</view> </view>
<view <view class="value" wx:if="{{ orderInfo.couponName || orderInfo.customerCoupon.customerCouponCode || orderInfo.customerCoupon.employeeName }}">
class="value"
wx:if="{{ orderInfo.couponName || orderInfo.customerCoupon.customerCouponCode || orderInfo.customerCoupon.employeeName }}"
>
{{orderInfo.couponName || ''}}{{orderInfo.customerCoupon.customerCouponCode ||''}}({{orderInfo.customerCoupon.employeeName || ''}}) {{orderInfo.couponName || ''}}{{orderInfo.customerCoupon.customerCouponCode ||''}}({{orderInfo.customerCoupon.employeeName || ''}})
</view> </view>
<view class="value" wx:else>无</view> <view class="value" wx:else>无</view>
...@@ -171,17 +164,9 @@ ...@@ -171,17 +164,9 @@
<!-- 非门店收款 已支付/已退款展示 --> <!-- 非门店收款 已支付/已退款展示 -->
<!-- wx:if="{{ isStaff && orderInfo.selectPayType != 2 && showMoreBtn && (orderInfo.status == 4 || orderInfo.status == 6 || orderInfo.status == 12) }}" --> <!-- wx:if="{{ isStaff && orderInfo.selectPayType != 2 && showMoreBtn && (orderInfo.status == 4 || orderInfo.status == 6 || orderInfo.status == 12) }}" -->
<view> <view>
<apply-refund-btn <apply-refund-btn orderInfo="{{ orderInfo }}" updateFlag="{{ updateFlag&&filter.btnPermissions(userPermissions, 'CHUANGJIANSHIGONGDAN')&&(orderInfo.status == 4 || orderInfo.status == 6||orderInfo.status == 2|| orderInfo.status == 12) }}" showRefundBtn="{{ isStaff && showMoreBtn && (orderInfo.status == 4 || orderInfo.status == 6 || orderInfo.status == 12) }}"></apply-refund-btn>
orderInfo="{{ orderInfo }}"
updateFlag="{{ updateFlag&&filter.btnPermissions(userPermissions, 'CHUANGJIANSHIGONGDAN')&&(orderInfo.status == 4 || orderInfo.status == 6||orderInfo.status == 2|| orderInfo.status == 12) }}"
showRefundBtn="{{ isStaff && showMoreBtn && (orderInfo.status == 4 || orderInfo.status == 6 || orderInfo.status == 12) }}"
></apply-refund-btn>
</view> </view>
<view <view wx:if="{{ orderInfo.showInvoiceEntrance || orderInfo.invoiceStatus == 2 }}" class="invoice-btn" bindtap="handleBtnInvoice">
wx:if="{{ orderInfo.showInvoiceEntrance || orderInfo.invoiceStatus == 2 }}"
class="invoice-btn"
bindtap="handleBtnInvoice"
>
<gl-image class="icon" src="/icon-invoice.png"></gl-image> <gl-image class="icon" src="/icon-invoice.png"></gl-image>
{{invoiceName}} {{invoiceName}}
</view> </view>
...@@ -219,20 +204,11 @@ ...@@ -219,20 +204,11 @@
</block> </block>
</view> </view>
</block> </block>
<block <block wx:if="{{ (orderInfo.selectPayType == 2 || orderInfo.selectPayType == 5 || orderInfo.selectPayType == 6 || orderInfo.selectPayType == 7) && orderInfo.payVoucherList.length }}">
wx:if="{{ (orderInfo.selectPayType == 2 || orderInfo.selectPayType == 5 || orderInfo.selectPayType == 6 || orderInfo.selectPayType == 7) && orderInfo.payVoucherList.length }}"
>
<view class="cell"> <view class="cell">
<view class="label">付款凭证</view> <view class="label">付款凭证</view>
<view class="image-box"> <view class="image-box">
<view <view class="value" bindtap="previewImage" wx:for="{{ orderInfo.payVoucherList }}" wx:key="index" data-index="{{ index }}" data-url="{{ orderInfo.payVoucherList }}">
class="value"
bindtap="previewImage"
wx:for="{{ orderInfo.payVoucherList }}"
wx:key="index"
data-index="{{ index }}"
data-url="{{ orderInfo.payVoucherList }}"
>
<view class="image"> <view class="image">
<image src="{{ item.payVoucher }}" /> <image src="{{ item.payVoucher }}" />
</view> </view>
...@@ -254,18 +230,11 @@ ...@@ -254,18 +230,11 @@
<view class="title userTitle"> <view class="title userTitle">
<text>客户信息</text> <text>客户信息</text>
<!-- 已退款或已开票不可修改客户任何信息 --> <!-- 已退款或已开票不可修改客户任何信息 -->
<view <view bindtap="jumpUserPortrait" class="updateInfo icon {{ orderInfo.status == 12 || orderInfo.invoiceStatus == 2||!isMake ? 'isHide' : '' }}">
bindtap="jumpUserPortrait"
class="updateInfo icon {{ orderInfo.status == 12 || orderInfo.invoiceStatus == 2||!isMake ? 'isHide' : '' }}"
>
<image src="{{ IMG_URL }}miniProgram/custom_portrait_icon.png" class="iconImage"></image> <image src="{{ IMG_URL }}miniProgram/custom_portrait_icon.png" class="iconImage"></image>
画像 画像
</view> </view>
<view <view wx:if="{{ isYqdSuper||isStaff }}" bindtap="jumpUpdate" class="updateInfo {{ orderInfo.status == 12 || orderInfo.invoiceStatus == 2 ||!isMake? 'isHide' : '' }}">
wx:if="{{ isYqdSuper||isStaff }}"
bindtap="jumpUpdate"
class="updateInfo {{ orderInfo.status == 12 || orderInfo.invoiceStatus == 2 ||!isMake? 'isHide' : '' }}"
>
<image src="{{ IMG_URL }}miniProgram/edit_icon.png" class="iconImage"></image> <image src="{{ IMG_URL }}miniProgram/edit_icon.png" class="iconImage"></image>
客户信息 客户信息
</view> </view>
...@@ -371,18 +340,8 @@ ...@@ -371,18 +340,8 @@
wx:if="{{ (!userInfo.isSuper && userInfo.loginRole != 3 && userInfo.loginRole != 6 && userInfo.userType == 2 && (orderInfo.status == 4 || orderInfo.status == 2 || orderInfo.status == 6)) && ((orderInfo.subOrderList && orderInfo.subOrderList.length) ||(orderInfo.packageGoodsList&&orderInfo.packageGoodsList.length)) }}" wx:if="{{ (!userInfo.isSuper && userInfo.loginRole != 3 && userInfo.loginRole != 6 && userInfo.userType == 2 && (orderInfo.status == 4 || orderInfo.status == 2 || orderInfo.status == 6)) && ((orderInfo.subOrderList && orderInfo.subOrderList.length) ||(orderInfo.packageGoodsList&&orderInfo.packageGoodsList.length)) }}"
> --> > -->
<view wx:if="{{ confirmFlagObj.showBtn }}" class="btn-box {{ isFullSucreen?'isFullSucreen-btn':'' }}"> <view wx:if="{{ confirmFlagObj.showBtn }}" class="btn-box {{ isFullSucreen?'isFullSucreen-btn':'' }}">
<view <view wx:if="{{ confirmFlagObj.btnName == 'constructionVisible' }}" class="btn text-center" data-btnName="{{ confirmFlagObj.btnName }}" bindtap="showModal">{{confirmFlagObj.showBtn}}</view>
wx:if="{{ confirmFlagObj.btnName == 'constructionVisible' }}" <view wx:if="{{ confirmFlagObj.btnName == 'sublistVisible' &&filter.btnPermissions(userPermissions, 'CHUANGJIANSHIGONGDAN')&&(orderInfo.status == 4 || orderInfo.status == 6|| orderInfo.status == 2|| orderInfo.status == 12) }}" class="btn text-center" data-btnName="{{ confirmFlagObj.btnName }}" bindtap="showModal">{{confirmFlagObj.showBtn}}</view>
class="btn text-center"
data-btnName="{{ confirmFlagObj.btnName }}"
bindtap="showModal"
>{{confirmFlagObj.showBtn}}</view>
<view
wx:if="{{ confirmFlagObj.btnName == 'sublistVisible' &&filter.btnPermissions(userPermissions, 'CHUANGJIANSHIGONGDAN')&&(orderInfo.status == 4 || orderInfo.status == 6|| orderInfo.status == 2|| orderInfo.status == 12) }}"
class="btn text-center"
data-btnName="{{ confirmFlagObj.btnName }}"
bindtap="showModal"
>{{confirmFlagObj.showBtn}}</view>
</view> </view>
<!-- 不需要走签名逻辑 --> <!-- 不需要走签名逻辑 -->
<!-- <view wx:if="{{ signatureSwitch&&orderInfo.selectPayType!=0 }}" class="btn-box {{ isFullSucreen?'isFullSucreen-btn':'' }}"> <!-- <view wx:if="{{ signatureSwitch&&orderInfo.selectPayType!=0 }}" class="btn-box {{ isFullSucreen?'isFullSucreen-btn':'' }}">
...@@ -425,30 +384,13 @@ ...@@ -425,30 +384,13 @@
</view> </view>
</modal> </modal>
<order-popup orderType="4" show="{{ showPopup }}" /> <order-popup orderType="4" show="{{ showPopup }}" />
<artificer-select-popup <artificer-select-popup show="{{ artificerSelectPopup }}" title="选择技师" copyArtificerList="{{ artificerList }}" orderInfo="{{ orderInfo }}" artificerSelectObj="{{ artificerSelectObj }}" bindconfirm="changeArtificer" />
show="{{ artificerSelectPopup }}"
title="选择技师"
copyArtificerList="{{ artificerList }}"
orderInfo="{{ orderInfo }}"
artificerSelectObj="{{ artificerSelectObj }}"
bindconfirm="changeArtificer"
/>
<!-- <wxs src="/utils/index.wxs" module="common" /> --> <!-- <wxs src="/utils/index.wxs" module="common" /> -->
<film-roll-no-popup <film-roll-no-popup show="{{ filmRollNoPopup }}" title="选择膜卷号" copyfilmRollNoList="{{ filmRollNoList }}" filmSelectedItem="{{ filmSelectedItem }}" bindconfirm="changefilmRollNo" />
show="{{ filmRollNoPopup }}"
title="选择膜卷号"
copyfilmRollNoList="{{ filmRollNoList }}"
filmSelectedItem="{{ filmSelectedItem }}"
bindconfirm="changefilmRollNo"
/>
<select-invoice-modal invoiveVisible="{{ invoiveVisible }}" orderInfo="{{ orderInfo }}"></select-invoice-modal> <select-invoice-modal invoiveVisible="{{ invoiveVisible }}" orderInfo="{{ orderInfo }}"></select-invoice-modal>
<sublist-modal visible="{{ sublistVisible }}" orderInfo="{{ orderInfo }}" orderCode="{{ orderCode }}" bindcancel="sublistCancel"></sublist-modal> <sublist-modal visible="{{ sublistVisible }}" orderInfo="{{ orderInfo }}" orderCode="{{ orderCode }}" bindcancel="sublistCancel" bind:openInventory="openInventory"></sublist-modal>
<ConstructionDetailModal <ConstructionDetailModal visible="{{ constructionVisible }}" orderInfo="{{ orderInfo }}" orderCode="{{ orderCode }}" bindcancel="constructionCancel" bind:openInventory="openInventory"></ConstructionDetailModal>
visible="{{ constructionVisible }}"
orderInfo="{{ orderInfo }}"
orderCode="{{ orderCode }}"
bindcancel="constructionCancel"
></ConstructionDetailModal>
<!-- <dialog show="{{showModal}}" confirmText="确定" cancelText="取消" showCancelButton success="{{success}}" bindconfirm="dialogConfirm" bindcancel="dialogClose" text="{{dialogText}}"> <!-- <dialog show="{{showModal}}" confirmText="确定" cancelText="取消" showCancelButton success="{{success}}" bindconfirm="dialogConfirm" bindcancel="dialogClose" text="{{dialogText}}">
</dialog> --> </dialog> -->
<study-permission-modal id="customModal" />
\ No newline at end of file \ No newline at end of file
<study-permission-modal id="customModal" />
<inventory-info show="{{showInventory}}" inventory-data="{{inventoryData}}" title="库存信息" bind:close="onInventoryClose" />
\ No newline at end of file \ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!