This commit is contained in:
2025-03-21 14:42:38 +08:00
parent 3fe42736e3
commit 38d09f0f37
4 changed files with 33 additions and 24 deletions

View File

@@ -160,10 +160,9 @@ uni-button:after {
.slide_new table thead tr th { .slide_new table thead tr th {
position: sticky; position: sticky;
top: 0; top: 0;
background: #d7d7d7;
font-size: 26rpx; font-size: 26rpx;
line-height: 28rpx; line-height: 58rpx;
padding: 35rpx 10rpx; padding: 4rpx 20rpx;
color: #7d7d7d; color: #7d7d7d;
background-color: #dcdfea; background-color: #dcdfea;
font-weight: bold; font-weight: bold;

View File

@@ -2,8 +2,8 @@
"name" : "西门子", "name" : "西门子",
"appid" : "__UNI__EF964CB", "appid" : "__UNI__EF964CB",
"description" : "西门子LMS手持系统", "description" : "西门子LMS手持系统",
"versionName" : "1.0.4", "versionName" : "1.0.5",
"versionCode" : 104, "versionCode" : 105,
"transformPx" : false, "transformPx" : false,
/* 5+App */ /* 5+App */
"app-plus" : { "app-plus" : {

View File

@@ -39,33 +39,34 @@
<uni-data-select v-model="index2" :localdata="options1"></uni-data-select> <uni-data-select v-model="index2" :localdata="options1"></uni-data-select>
</view> </view>
</view> </view>
<view class="zd-row border-bottom">
<view class="zd-col-7">
<span class="filter_label">交期时间</span>
</view>
<view class="zd-col-17 filter_select">
<uni-datetime-picker type="datetime" v-model="datetimesingle" :border="false" />
</view>
</view>
</view> </view>
<view class="zd_wrapper grid-wraper"> <view class="zd_wrapper grid-wraper">
<view class="slide_new"> <view class="slide_new">
<table> <table>
<thead> <thead>
<tr> <tr>
<th>操作</th> <th @tap="addRow">
<view style="display: flex;align-items: center;font-weight: normal;">
<uni-icons type="plus-filled" size="28" color="#4e6ef2"></uni-icons>
</view>
</th>
<th>订单号</th> <th>订单号</th>
<th>物料号</th> <th>物料号</th>
<th>物料数量</th> <th>物料数量</th>
<th>交期时间</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<tr v-for="(e, i) in dataList" :key="i"> <tr v-for="(e, i) in dataList" :key="i">
<td @tap="addRow"><uni-icons type="plus-filled" size="30" color="#4e6ef2"></uni-icons></td> <td @tap="addRow">
<view style="display: flex;align-items: center;">
<uni-icons type="plus-filled" size="28" color="#4e6ef2"></uni-icons>
</view>
</td>
<td><input type="text" class="td_input" v-model="e.order_code"></td> <td><input type="text" class="td_input" v-model="e.order_code"></td>
<td><input type="text" class="td_input" v-model="e.material_code"></td> <td><input type="text" class="td_input" v-model="e.material_code"></td>
<td><input type="number" class="td_input" v-model="e.material_qty"></td> <td><input type="number" class="td_input" v-model="e.material_qty"></td>
<td>{{e.due_date}}</td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
@@ -109,8 +110,7 @@
index1: '', index1: '',
index2: '', index2: '',
disabled: false, disabled: false,
dataList: [{order_code: '', material_code: '', material_qty: 0}], dataList: []
datetimesingle: ''
}; };
}, },
onLoad (options) { onLoad (options) {
@@ -119,7 +119,7 @@
}, },
methods: { methods: {
selectChange (e) { selectChange (e) {
this.dataList = [{order_code: '', material_code: '', material_qty: 0}] this.dataList = []
this.index1 = '' this.index1 = ''
this.index2 = '' this.index2 = ''
}, },
@@ -131,13 +131,13 @@
}) })
}, },
addRow () { addRow () {
this.dataList.push({order_code: '', material_code: '', material_qty: 0}) this.dataList.push({order_code: '', material_code: '', material_qty: 0, due_date: this.getCurrentDateTime()})
}, },
clearUp () { clearUp () {
this.val1 = '' this.val1 = ''
this.val2 = '' this.val2 = ''
this.index = '' this.index = ''
this.dataList = [{order_code: '', material_code: '', material_qty: 0}] this.dataList = []
this.index1 = '' this.index1 = ''
this.index2 = '' this.index2 = ''
this.disabled = false this.disabled = false
@@ -155,7 +155,7 @@
} }
}) })
try { try {
let res = await handheldBlanking(this.index, this.val1, this.index1, this.val2, arr, this.index2, this.datetimesingle) let res = await handheldBlanking(this.index, this.val1, this.index1, this.val2, arr, this.index2)
this.clearUp() this.clearUp()
uni.showToast({ uni.showToast({
title: res.message, title: res.message,
@@ -164,6 +164,16 @@
} catch (e) { } catch (e) {
this.disabled = false this.disabled = false
} }
},
getCurrentDateTime() {
const now = new Date()
const year = now.getFullYear()
const month = String(now.getMonth() + 1).padStart(2, '0') // 月份从0开始需要加1
const day = String(now.getDate()).padStart(2, '0')
const hours = String(now.getHours()).padStart(2, '0')
const minutes = String(now.getMinutes()).padStart(2, '0')
const seconds = String(now.getSeconds()).padStart(2, '0')
return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`
} }
} }
} }

View File

@@ -60,9 +60,9 @@ export const handheldStorehouse = (code, type) => request({
// url:'api/handheld/getRegionCode', // url:'api/handheld/getRegionCode',
// data: {orderCode: code} // data: {orderCode: code}
// }) // })
export const handheldBlanking = (type, code, rcode, vcode, material, reg, date) => request({ export const handheldBlanking = (type, code, rcode, vcode, material, reg) => request({
url:'api/handheld/blanking', url:'api/handheld/blanking',
data: {type: type, device_code: code, region_code: rcode, vehicle_code: vcode, material: material, regionCode: reg, due_date: date} data: {type: type, device_code: code, region_code: rcode, vehicle_code: vcode, material: material, regionCode: reg}
}) })
// 修改订单工序 // 修改订单工序
export const fabOrders = (code) => request({ export const fabOrders = (code) => request({