|
|
@@ -308,8 +308,8 @@
|
|
|
vehiclePhotoUrl: [],
|
|
|
purchaseOrderId: '',
|
|
|
purchaseOrderNo: '',
|
|
|
- clientEnvironmentId: uni.getStorageSync("userInfo") &&
|
|
|
- uni.getStorageSync("userInfo").clientEnvironmentId,
|
|
|
+ // clientEnvironmentId: uni.getStorageSync("userInfo") &&
|
|
|
+ // uni.getStorageSync("userInfo").clientEnvironmentId,
|
|
|
};
|
|
|
import {
|
|
|
getById,
|
|
|
@@ -468,7 +468,8 @@
|
|
|
this.form.purchaseOrderNo = data.orderNo;
|
|
|
},
|
|
|
getCode() {
|
|
|
- if (this.clientEnvironmentId == 10) {
|
|
|
+ let userInfo = uni.getStorageSync("userInfo")
|
|
|
+ if (userInfo.clientEnvironmentId == 10) {
|
|
|
return this.pageName == 'QualityInspection' ?
|
|
|
'06mei' :
|
|
|
this.pageName == 'TransportAsh' ?
|
|
|
@@ -484,17 +485,18 @@
|
|
|
async getOrderDetials(id) {
|
|
|
try {
|
|
|
const data = await getById(id);
|
|
|
- let userInfo=uni.getStorageSync("userInfo")
|
|
|
+
|
|
|
+ let userInfo = uni.getStorageSync("userInfo")
|
|
|
|
|
|
if (data.type == 1) {
|
|
|
//班组报工默认单前登录人
|
|
|
data.executeUsers = [{
|
|
|
- groupId:userInfo.groupId,
|
|
|
+ groupId: userInfo.groupId,
|
|
|
groupName: userInfo.groupName,
|
|
|
teamId: null,
|
|
|
teamName: '',
|
|
|
userId: userInfo.userId,
|
|
|
- userName:userInfo.name
|
|
|
+ userName: userInfo.name
|
|
|
}];
|
|
|
}
|
|
|
|
|
|
@@ -585,11 +587,11 @@
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
+ console.log(userInfo, 'this.clientEnvironmentId')
|
|
|
//宇信
|
|
|
if (
|
|
|
- this.clientEnvironmentId == 10 && ['productionRecords',
|
|
|
- 'qualityTestRecords'
|
|
|
- ].includes(this.pageName)
|
|
|
+ userInfo.clientEnvironmentId == 10 && ['productionRecords', 'qualityTestRecords'].includes(this
|
|
|
+ .pageName)
|
|
|
) {
|
|
|
//客户:5#和6#默认是重油公司7#默认是红山 2008389016775864321==7#
|
|
|
if (this.form.productLineId == '2008389016775864321') {
|
|
|
@@ -634,12 +636,12 @@
|
|
|
|
|
|
_this.uploadFile(res.tempFilePaths).then(res => {
|
|
|
res.forEach(item => {
|
|
|
- let fileNames = item.storePath.split('/')
|
|
|
- let url =
|
|
|
- '/main/file/getFile?objectName=' + item.storePath +
|
|
|
- '&fullfilename=' + fileNames[fileNames.length -
|
|
|
- 1]
|
|
|
- _this.form.vehiclePhotoUrl.push(url)
|
|
|
+ // let fileNames = item.storePath.split('/')
|
|
|
+ // let url =
|
|
|
+ // '/main/file/getFile?objectName=' + item.storePath +
|
|
|
+ // '&fullfilename=' + fileNames[fileNames.length -
|
|
|
+ // 1]
|
|
|
+ _this.form.vehiclePhotoUrl.push(item.storePath)
|
|
|
})
|
|
|
|
|
|
uni.hideLoading()
|
|
|
@@ -650,10 +652,12 @@
|
|
|
});
|
|
|
},
|
|
|
getUrl(arr) {
|
|
|
- console.log(arr, 'arr')
|
|
|
+ // console.log(arr, 'arr')
|
|
|
if (arr.length) {
|
|
|
return arr.map(item => {
|
|
|
- return this.apiUrl + item
|
|
|
+ let fileNames = item.split('/')
|
|
|
+ return this.apiUrl + '/main/file/getFile?objectName=' + item + '&fullfilename=' +
|
|
|
+ fileNames[fileNames.length - 1]
|
|
|
})
|
|
|
} else {
|
|
|
return []
|
|
|
@@ -875,23 +879,33 @@
|
|
|
});
|
|
|
return;
|
|
|
}
|
|
|
- // if (this.pageName == 'steamInjectionInspectionRecord' && !this.form.contactName) {
|
|
|
- // this.$refs.uToast.show({
|
|
|
- // type: "error",
|
|
|
- // icon: false,
|
|
|
- // message: `请选择甲方检查人!`,
|
|
|
- // });
|
|
|
- // return;
|
|
|
- // }
|
|
|
- // if (this.pageName == 'solidWasteRecord' && !this.form.supplierName) {
|
|
|
- // this.$refs.uToast.show({
|
|
|
- // type: "error",
|
|
|
- // icon: false,
|
|
|
- // message: `请选择处理方!`,
|
|
|
- // });
|
|
|
- // return;
|
|
|
- // }
|
|
|
-
|
|
|
+ if (['QualityInspection', 'TransportAsh', 'HaulSlag'].includes(this.pageName) && !this.form
|
|
|
+ .supplierName) {
|
|
|
+ this.$refs.uToast.show({
|
|
|
+ type: "error",
|
|
|
+ icon: false,
|
|
|
+ message: `请选择供应商!`,
|
|
|
+ });
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if (['QualityInspection', 'TransportAsh', 'HaulSlag'].includes(this.pageName) && !this.form
|
|
|
+ .purchaseOrderNo) {
|
|
|
+ this.$refs.uToast.show({
|
|
|
+ type: "error",
|
|
|
+ icon: false,
|
|
|
+ message: `请选择采购订单!`,
|
|
|
+ });
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if (['QualityInspection', 'TransportAsh', 'HaulSlag'].includes(this.pageName) && !this.form
|
|
|
+ .vehiclePhotoUrl.length) {
|
|
|
+ this.$refs.uToast.show({
|
|
|
+ type: "error",
|
|
|
+ icon: false,
|
|
|
+ message: `请选择照片!`,
|
|
|
+ });
|
|
|
+ return;
|
|
|
+ }
|
|
|
|
|
|
// 验证报工时间必须大于等于检查时间
|
|
|
const startTime = new Date(this.form.checkStartTime).getTime();
|