调机记录功能修改
This commit is contained in:
@@ -85,3 +85,10 @@ export function delEmployeeLineRel(id) {
|
|||||||
method: 'delete'
|
method: 'delete'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function getEmployeeByCode(code) {
|
||||||
|
return request({
|
||||||
|
url: '/basic/employee/getEmpByCode/' + code,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
314
manifest.json
314
manifest.json
@@ -1,159 +1,159 @@
|
|||||||
{
|
{
|
||||||
"name": "MES",
|
"name" : "MES",
|
||||||
"appid": "__UNI__66F7FE2",
|
"appid" : "__UNI__66F7FE2",
|
||||||
"description": "",
|
"description" : "",
|
||||||
"versionName": "3.4.6",
|
"versionName" : "3.4.9",
|
||||||
"versionCode": 346,
|
"versionCode" : 349,
|
||||||
"transformPx": false,
|
"transformPx" : false,
|
||||||
"sassImplementationName": "node-sass",
|
"sassImplementationName" : "node-sass",
|
||||||
"app-plus": {
|
"app-plus" : {
|
||||||
"usingComponents": true,
|
"usingComponents" : true,
|
||||||
"nvueCompiler": "uni-app",
|
"nvueCompiler" : "uni-app",
|
||||||
"splashscreen": {
|
"splashscreen" : {
|
||||||
"alwaysShowBeforeRender": true,
|
"alwaysShowBeforeRender" : true,
|
||||||
"waiting": true,
|
"waiting" : true,
|
||||||
"autoclose": true,
|
"autoclose" : true,
|
||||||
"delay": 0
|
"delay" : 0
|
||||||
},
|
},
|
||||||
// 禁用 HTML5+ RunTime 提示
|
// 禁用 HTML5+ RunTime 提示
|
||||||
"compatible": {
|
"compatible" : {
|
||||||
"ignoreVersion": true
|
"ignoreVersion" : true
|
||||||
},
|
},
|
||||||
"modules": {
|
"modules" : {
|
||||||
"Camera": {},
|
"Camera" : {},
|
||||||
"Barcode": {}
|
"Barcode" : {}
|
||||||
},
|
},
|
||||||
"distribute": {
|
"distribute" : {
|
||||||
"android": {
|
"android" : {
|
||||||
"permissions": [
|
"permissions" : [
|
||||||
"<uses-permission android:name=\"android.permission.INTERNET\" />",
|
"<uses-permission android:name=\"android.permission.INTERNET\" />",
|
||||||
"<uses-permission android:name=\"android.permission.READ_EXTERNAL_STORAGE\" />",
|
"<uses-permission android:name=\"android.permission.READ_EXTERNAL_STORAGE\" />",
|
||||||
"<uses-permission android:name=\"android.permission.WRITE_EXTERNAL_STORAGE\" />",
|
"<uses-permission android:name=\"android.permission.WRITE_EXTERNAL_STORAGE\" />",
|
||||||
"<uses-permission android:name=\"com.asus.msa.SupplementaryDID.ACCESS\" />",
|
"<uses-permission android:name=\"com.asus.msa.SupplementaryDID.ACCESS\" />",
|
||||||
"<uses-permission android:name=\"com.huawei.android.launcher.permission.CHANGE_BADGE\" />",
|
"<uses-permission android:name=\"com.huawei.android.launcher.permission.CHANGE_BADGE\" />",
|
||||||
"<uses-permission android:name=\"android.permission.INSTALL_PACKAGES\" />",
|
"<uses-permission android:name=\"android.permission.INSTALL_PACKAGES\" />",
|
||||||
"<uses-permission android:name=\"android.permission.REQUEST_INSTALL_PACKAGES\" />",
|
"<uses-permission android:name=\"android.permission.REQUEST_INSTALL_PACKAGES\" />",
|
||||||
"<uses-feature android:name=\"android.hardware.camera\"/>",
|
"<uses-feature android:name=\"android.hardware.camera\"/>",
|
||||||
"<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
|
"<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
|
||||||
"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
|
"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
|
||||||
"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
|
"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
|
||||||
"<uses-permission android:name=\"android.permission.BLUETOOTH\"/>",
|
"<uses-permission android:name=\"android.permission.BLUETOOTH\"/>",
|
||||||
"<uses-permission android:name=\"android.permission.BLUETOOTH_ADMIN\"/>",
|
"<uses-permission android:name=\"android.permission.BLUETOOTH_ADMIN\"/>",
|
||||||
"<uses-permission android:name=\"android.permission.CAMERA\"/>",
|
"<uses-permission android:name=\"android.permission.CAMERA\"/>",
|
||||||
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
|
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
|
||||||
"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
|
"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
|
||||||
"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
|
"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
|
||||||
"<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
|
"<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
|
||||||
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
|
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
|
||||||
"<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
|
"<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
|
||||||
"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
|
"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
|
||||||
"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
|
"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
|
||||||
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
|
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
|
||||||
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
|
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
|
||||||
],
|
],
|
||||||
"abiFilters": ["armeabi-v7a", "arm64-v8a", "x86"]
|
"abiFilters" : [ "armeabi-v7a", "arm64-v8a", "x86" ]
|
||||||
},
|
},
|
||||||
"ios": {
|
"ios" : {
|
||||||
"dSYMs": false
|
"dSYMs" : false
|
||||||
},
|
},
|
||||||
"sdkConfigs": {
|
"sdkConfigs" : {
|
||||||
"ad": {}
|
"ad" : {}
|
||||||
},
|
},
|
||||||
"icons": {
|
"icons" : {
|
||||||
"android": {
|
"android" : {
|
||||||
"hdpi": "unpackage/res/icons/72x72.png",
|
"hdpi" : "unpackage/res/icons/72x72.png",
|
||||||
"xhdpi": "unpackage/res/icons/96x96.png",
|
"xhdpi" : "unpackage/res/icons/96x96.png",
|
||||||
"xxhdpi": "unpackage/res/icons/144x144.png",
|
"xxhdpi" : "unpackage/res/icons/144x144.png",
|
||||||
"xxxhdpi": "unpackage/res/icons/192x192.png"
|
"xxxhdpi" : "unpackage/res/icons/192x192.png"
|
||||||
},
|
},
|
||||||
"ios": {
|
"ios" : {
|
||||||
"appstore": "unpackage/res/icons/1024x1024.png",
|
"appstore" : "unpackage/res/icons/1024x1024.png",
|
||||||
"ipad": {
|
"ipad" : {
|
||||||
"app": "unpackage/res/icons/76x76.png",
|
"app" : "unpackage/res/icons/76x76.png",
|
||||||
"app@2x": "unpackage/res/icons/152x152.png",
|
"app@2x" : "unpackage/res/icons/152x152.png",
|
||||||
"notification": "unpackage/res/icons/20x20.png",
|
"notification" : "unpackage/res/icons/20x20.png",
|
||||||
"notification@2x": "unpackage/res/icons/40x40.png",
|
"notification@2x" : "unpackage/res/icons/40x40.png",
|
||||||
"proapp@2x": "unpackage/res/icons/167x167.png",
|
"proapp@2x" : "unpackage/res/icons/167x167.png",
|
||||||
"settings": "unpackage/res/icons/29x29.png",
|
"settings" : "unpackage/res/icons/29x29.png",
|
||||||
"settings@2x": "unpackage/res/icons/58x58.png",
|
"settings@2x" : "unpackage/res/icons/58x58.png",
|
||||||
"spotlight": "unpackage/res/icons/40x40.png",
|
"spotlight" : "unpackage/res/icons/40x40.png",
|
||||||
"spotlight@2x": "unpackage/res/icons/80x80.png"
|
"spotlight@2x" : "unpackage/res/icons/80x80.png"
|
||||||
},
|
},
|
||||||
"iphone": {
|
"iphone" : {
|
||||||
"app@2x": "unpackage/res/icons/120x120.png",
|
"app@2x" : "unpackage/res/icons/120x120.png",
|
||||||
"app@3x": "unpackage/res/icons/180x180.png",
|
"app@3x" : "unpackage/res/icons/180x180.png",
|
||||||
"notification@2x": "unpackage/res/icons/40x40.png",
|
"notification@2x" : "unpackage/res/icons/40x40.png",
|
||||||
"notification@3x": "unpackage/res/icons/60x60.png",
|
"notification@3x" : "unpackage/res/icons/60x60.png",
|
||||||
"settings@2x": "unpackage/res/icons/58x58.png",
|
"settings@2x" : "unpackage/res/icons/58x58.png",
|
||||||
"settings@3x": "unpackage/res/icons/87x87.png",
|
"settings@3x" : "unpackage/res/icons/87x87.png",
|
||||||
"spotlight@2x": "unpackage/res/icons/80x80.png",
|
"spotlight@2x" : "unpackage/res/icons/80x80.png",
|
||||||
"spotlight@3x": "unpackage/res/icons/120x120.png"
|
"spotlight@3x" : "unpackage/res/icons/120x120.png"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"splashscreen": {
|
"splashscreen" : {
|
||||||
"useOriginalMsgbox": false
|
"useOriginalMsgbox" : false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nativePlugins": {
|
"nativePlugins" : {
|
||||||
"Fvv-UniSerialPort": {
|
"Fvv-UniSerialPort" : {
|
||||||
"__plugin_info__": {
|
"__plugin_info__" : {
|
||||||
"name": "安卓串口通信 Fvv-UniSerialPort",
|
"name" : "安卓串口通信 Fvv-UniSerialPort",
|
||||||
"description": "Android平台串口通信插件,支持串口号、波特率、数据位、校验位、停止位、流控等参数设置",
|
"description" : "Android平台串口通信插件,支持串口号、波特率、数据位、校验位、停止位、流控等参数设置",
|
||||||
"platforms": "Android",
|
"platforms" : "Android",
|
||||||
"url": "https://ext.dcloud.net.cn/plugin?id=1787",
|
"url" : "https://ext.dcloud.net.cn/plugin?id=1787",
|
||||||
"android_package_name": "uni.UNI66F7FE2",
|
"android_package_name" : "uni.UNI66F7FE2",
|
||||||
"ios_bundle_id": "uni.UNI66F7FE2",
|
"ios_bundle_id" : "uni.UNI66F7FE2",
|
||||||
"isCloud": true,
|
"isCloud" : true,
|
||||||
"bought": 1,
|
"bought" : 1,
|
||||||
"pid": "1787",
|
"pid" : "1787",
|
||||||
"parameters": {}
|
"parameters" : {}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"orientation": [
|
"orientation" : [
|
||||||
//竖屏正方向
|
//竖屏正方向
|
||||||
"portrait-primary",
|
"portrait-primary",
|
||||||
//竖屏反方向
|
//竖屏反方向
|
||||||
"portrait-secondary",
|
"portrait-secondary",
|
||||||
//横屏正方向
|
//横屏正方向
|
||||||
"landscape-primary",
|
"landscape-primary",
|
||||||
//横屏反方向
|
//横屏反方向
|
||||||
"landscape-secondary",
|
"landscape-secondary",
|
||||||
//自然方向
|
//自然方向
|
||||||
"default"
|
"default"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"quickapp": {},
|
"quickapp" : {},
|
||||||
"mp-weixin": {
|
"mp-weixin" : {
|
||||||
"appid": "wx366e867b9fb64fdf",
|
"appid" : "wx366e867b9fb64fdf",
|
||||||
"setting": {
|
"setting" : {
|
||||||
"urlCheck": true,
|
"urlCheck" : true,
|
||||||
"es6": false,
|
"es6" : false,
|
||||||
"minified": true,
|
"minified" : true,
|
||||||
"postcss": true
|
"postcss" : true
|
||||||
},
|
},
|
||||||
"optimization": {
|
"optimization" : {
|
||||||
"subPackages": true
|
"subPackages" : true
|
||||||
},
|
},
|
||||||
"usingComponents": true
|
"usingComponents" : true
|
||||||
},
|
},
|
||||||
"vueVersion": "2",
|
"vueVersion" : "2",
|
||||||
"h5": {
|
"h5" : {
|
||||||
"template": "static/index.html",
|
"template" : "static/index.html",
|
||||||
"devServer": {
|
"devServer" : {
|
||||||
"port": 9090,
|
"port" : 9090,
|
||||||
"https": false
|
"https" : false
|
||||||
},
|
},
|
||||||
"title": "RuoYi-App",
|
"title" : "RuoYi-App",
|
||||||
"router": {
|
"router" : {
|
||||||
"mode": "hash",
|
"mode" : "hash",
|
||||||
"base": "./"
|
"base" : "./"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"permissions": {
|
"permissions" : {
|
||||||
"network": {
|
"network" : {
|
||||||
"description": "用于获取网络状态和IP地址"
|
"description" : "用于获取网络状态和IP地址"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -73,7 +73,6 @@ export default {
|
|||||||
bind(_this.formData).then(res => {
|
bind(_this.formData).then(res => {
|
||||||
_this.$modal.closeLoading();
|
_this.$modal.closeLoading();
|
||||||
_this.$modal.msgSuccess("绑定成功!");
|
_this.$modal.msgSuccess("绑定成功!");
|
||||||
_this.reset();
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.$tab.switchTab("/pages/work/index");
|
this.$tab.switchTab("/pages/work/index");
|
||||||
}, 500);
|
}, 500);
|
||||||
@@ -102,7 +101,6 @@ export default {
|
|||||||
unBind(_this.formData.locationCode).then(res => {
|
unBind(_this.formData.locationCode).then(res => {
|
||||||
_this.$modal.closeLoading();
|
_this.$modal.closeLoading();
|
||||||
_this.$modal.msgSuccess("解绑成功!");
|
_this.$modal.msgSuccess("解绑成功!");
|
||||||
_this.reset();
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.$tab.switchTab("/pages/work/index");
|
this.$tab.switchTab("/pages/work/index");
|
||||||
}, 500);
|
}, 500);
|
||||||
@@ -117,13 +115,6 @@ export default {
|
|||||||
});
|
});
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
reset() {
|
|
||||||
this.formData = {
|
|
||||||
locationCode: null,
|
|
||||||
batchNo: null,
|
|
||||||
};
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -75,7 +75,6 @@ export default {
|
|||||||
addDeliveryTask(_this.formData).then(res => {
|
addDeliveryTask(_this.formData).then(res => {
|
||||||
_this.$modal.closeLoading();
|
_this.$modal.closeLoading();
|
||||||
_this.$modal.msgSuccess("提交成功!");
|
_this.$modal.msgSuccess("提交成功!");
|
||||||
_this.reset();
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
_this.$tab.switchTab("/pages/work/index");
|
_this.$tab.switchTab("/pages/work/index");
|
||||||
}, 500);
|
}, 500);
|
||||||
@@ -85,11 +84,6 @@ export default {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
reset() {
|
|
||||||
this.formData.srcLocationCode = null;
|
|
||||||
this.formData.destLocationCode = null;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -72,7 +72,6 @@ export default {
|
|||||||
delivery(_this.formData).then(res => {
|
delivery(_this.formData).then(res => {
|
||||||
_this.$modal.closeLoading();
|
_this.$modal.closeLoading();
|
||||||
_this.$modal.msgSuccess("提交成功!");
|
_this.$modal.msgSuccess("提交成功!");
|
||||||
_this.reset();
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.$tab.switchTab("/pages/work/index");
|
this.$tab.switchTab("/pages/work/index");
|
||||||
}, 500);
|
}, 500);
|
||||||
@@ -96,7 +95,6 @@ export default {
|
|||||||
cancel(arr).then(res => {
|
cancel(arr).then(res => {
|
||||||
_this.$modal.closeLoading();
|
_this.$modal.closeLoading();
|
||||||
_this.$modal.msgSuccess("取消成功!");
|
_this.$modal.msgSuccess("取消成功!");
|
||||||
_this.reset();
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.$tab.switchTab("/pages/work/index");
|
this.$tab.switchTab("/pages/work/index");
|
||||||
}, 500);
|
}, 500);
|
||||||
@@ -108,16 +106,6 @@ export default {
|
|||||||
});
|
});
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
reset() {
|
|
||||||
this.formData = {
|
|
||||||
id: null,
|
|
||||||
srcLocationCode: null,
|
|
||||||
taskTyp: null,
|
|
||||||
robotType: null,
|
|
||||||
ctnrTyp: null,
|
|
||||||
};
|
|
||||||
this.destLocationCode = null;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -66,7 +66,6 @@ export default {
|
|||||||
addDeliveryTask(_this.formData).then(res => {
|
addDeliveryTask(_this.formData).then(res => {
|
||||||
_this.$modal.closeLoading();
|
_this.$modal.closeLoading();
|
||||||
_this.$modal.msgSuccess("提交成功!");
|
_this.$modal.msgSuccess("提交成功!");
|
||||||
_this.reset();
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.$tab.switchTab("/pages/work/index");
|
this.$tab.switchTab("/pages/work/index");
|
||||||
}, 500);
|
}, 500);
|
||||||
@@ -76,10 +75,6 @@ export default {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
reset() {
|
|
||||||
this.formData.srcLocationCode = null;
|
|
||||||
this.formData.destLocationCode = null;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="form-container">
|
<view>
|
||||||
<uni-forms ref="form" :modelValue="formData" :rules="rules">
|
<uni-forms ref="form" :modelValue="formData" :rules="rules">
|
||||||
<uni-forms-item label="作业编码:" :labelWidth='90' name="pwoJobCode">
|
<uni-forms-item label="作业编码:" :labelWidth='90' name="pwoJobCode">
|
||||||
<uni-easyinput @confirm="searchData" suffixIcon="scan" @iconClick="scanBar" type="text"
|
<uni-easyinput @confirm="searchData" suffixIcon="scan" @iconClick="scanBar" type="text"
|
||||||
@@ -33,17 +33,18 @@
|
|||||||
<uni-forms-item label="人员:" :labelWidth='90' name="staff">
|
<uni-forms-item label="人员:" :labelWidth='90' name="staff">
|
||||||
<uni-easyinput type="text" v-model="formData.staff" @confirm="searchStaff" />
|
<uni-easyinput type="text" v-model="formData.staff" @confirm="searchStaff" />
|
||||||
</uni-forms-item>
|
</uni-forms-item>
|
||||||
<uni-forms-item label="调试单价:" :labelWidth='90' name="programmingDebuggingUnitPrice">
|
<uni-row>
|
||||||
<uni-easyinput type="text" v-model="formData.programmingDebuggingUnitPrice" />
|
<uni-col :span="12">
|
||||||
</uni-forms-item>
|
<uni-forms-item label="调机时长:" :labelWidth='90' name="timeTake" class="form-col">
|
||||||
<view class="form-row">
|
<uni-easyinput type="text" v-model="timeTake" />
|
||||||
<uni-forms-item label="调机时长:" :labelWidth='90' name="timeTake" class="form-col">
|
</uni-forms-item>
|
||||||
<uni-easyinput type="text" v-model="timeTake" />
|
</uni-col>
|
||||||
</uni-forms-item>
|
<uni-col :span="12">
|
||||||
<uni-forms-item label="时间单位:" :labelWidth='90' name="timeUnit" class="form-col">
|
<uni-forms-item label="时间单位:" :labelWidth='90' name="timeUnit" class="form-col">
|
||||||
<uni-data-select v-model="timeUnit" :localdata="unitOptions" placeholder="选择时间单位" />
|
<uni-data-select v-model="timeUnit" :localdata="unitOptions" placeholder="选择时间单位" />
|
||||||
</uni-forms-item>
|
</uni-forms-item>
|
||||||
</view>
|
</uni-col>
|
||||||
|
</uni-row>
|
||||||
</uni-forms>
|
</uni-forms>
|
||||||
<u-button type="primary" @click="submit">提交</u-button>
|
<u-button type="primary" @click="submit">提交</u-button>
|
||||||
</view>
|
</view>
|
||||||
@@ -52,7 +53,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import { addRecord } from "@/api/mes/mesMachineSetUpRecord.js";
|
import { addRecord } from "@/api/mes/mesMachineSetUpRecord.js";
|
||||||
import { listPwoJob } from "@/api/mes/jobReport.js";
|
import { listPwoJob } from "@/api/mes/jobReport.js";
|
||||||
import { getUserInfo } from "@/api/system/user.js"
|
import { getEmployeeByCode } from "@/api/basic/employee.js"
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@@ -77,7 +78,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.$set(this.formData, "staff", this.$store.state.user.name);
|
this.$set(this.formData, "staff", this.$store.state.employee.empName);
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
scanBar() {
|
scanBar() {
|
||||||
@@ -92,8 +93,12 @@ export default {
|
|||||||
},
|
},
|
||||||
searchStaff() {
|
searchStaff() {
|
||||||
const _this = this;
|
const _this = this;
|
||||||
getUserInfo(_this.formData.staff).then(async res => {
|
getEmployeeByCode(_this.formData.staff).then(async res => {
|
||||||
_this.$set(_this.formData, "staff", res.data.userName);
|
if(res.data != null){
|
||||||
|
_this.$set(_this.formData, "staff", res.data.name);
|
||||||
|
}else{
|
||||||
|
_this.$modal.msg("未查询到该员工!");
|
||||||
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
searchData() {
|
searchData() {
|
||||||
@@ -155,7 +160,7 @@ export default {
|
|||||||
addRecord(_this.formData).then(res => {
|
addRecord(_this.formData).then(res => {
|
||||||
_this.$modal.closeLoading();
|
_this.$modal.closeLoading();
|
||||||
_this.$modal.msgSuccess("提交成功!");
|
_this.$modal.msgSuccess("提交成功!");
|
||||||
_this.reset();
|
// _this.reset();
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.$tab.switchTab("/pages/work/index");
|
this.$tab.switchTab("/pages/work/index");
|
||||||
}, 500);
|
}, 500);
|
||||||
@@ -193,62 +198,9 @@ export default {
|
|||||||
// 拼接为 "YYYY-MM-DD HH:mm" 格式
|
// 拼接为 "YYYY-MM-DD HH:mm" 格式
|
||||||
return `${year}-${month}-${day} ${hour}:${minute}:${second}`;
|
return `${year}-${month}-${day} ${hour}:${minute}:${second}`;
|
||||||
},
|
},
|
||||||
reset() {
|
|
||||||
this.timeTake = null;
|
|
||||||
this.timeUnit = 'h';
|
|
||||||
this.formData = {
|
|
||||||
startTime: null,
|
|
||||||
endTime: null,
|
|
||||||
pwoJobCode: null,
|
|
||||||
pwoCode: null,
|
|
||||||
ptNoTar: null,
|
|
||||||
ptTitleTar: null,
|
|
||||||
opCode: null,
|
|
||||||
opTitle: null,
|
|
||||||
machineAdjustmentDuration: null
|
|
||||||
};
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style>
|
||||||
.form-container {
|
|
||||||
padding: 15px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.form-row {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
gap: 15px;
|
|
||||||
/* 两个项之间的间距 */
|
|
||||||
width: 100%;
|
|
||||||
margin: 10px 0;
|
|
||||||
/* 与上下表单项保持默认间距 */
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 并列项平分宽度 */
|
|
||||||
.form-col {
|
|
||||||
flex: 1;
|
|
||||||
min-width: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 可选:统一并列项的label样式(避免对齐错乱) */
|
|
||||||
:deep(.form-col .uni-forms-item__label) {
|
|
||||||
width: 80px !important;
|
|
||||||
/* 固定label宽度 */
|
|
||||||
text-align: left;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 其他表单项保持默认样式,无需额外修改 */
|
|
||||||
:deep(.uni-forms-item) {
|
|
||||||
margin-bottom: 80px;
|
|
||||||
/* 统一所有表单项的底部间距 */
|
|
||||||
}
|
|
||||||
|
|
||||||
.u-button {
|
|
||||||
height: 10% !important;
|
|
||||||
position: absolute;
|
|
||||||
bottom: 0;
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
Reference in New Issue
Block a user