代码优化

This commit is contained in:
BianLzhaoMin 2024-09-09 14:39:03 +08:00
parent 8cfbf163c0
commit 2b1311b5a1
9 changed files with 1037 additions and 781 deletions

View File

@ -388,6 +388,14 @@ const exitMaterial = {
header header
); );
}, },
async ifAgreementNew(data = {}, header = {}) {
return await Http.post(
HttpConfig.materialPath,
HttpConfig.serviceUrl.exitMaterial.ifAgreement,
data,
header
);
},
}; };
const exitExam = { const exitExam = {

View File

@ -18,7 +18,7 @@ class HttpConfig {
// baseUrl = "https://z.csgmall.com.cn/gl" // baseUrl = "https://z.csgmall.com.cn/gl"
// baseUrl = "http://192.168.2.160:39080" // 梁超 // baseUrl = "http://192.168.2.160:39080" // 梁超
// baseUrl = "http://192.168.2.218:39080" // 福 // baseUrl = "http://192.168.2.218:39080" // 福
target = "http://192.168.0.56:21627"; // 开发阶段后台ip target = "http://192.168.43.200:39080"; // 开发阶段后台ip
// #endif // #endif
// 基地址 (部署时使用 需要加 dev-api // 基地址 (部署时使用 需要加 dev-api
// authPath = `${this.baseUrl}/dev-api/auth` // authPath = `${this.baseUrl}/dev-api/auth`

View File

@ -282,7 +282,7 @@
formSubmit() { formSubmit() {
let that = this; let that = this;
that.$refs.exitForm.validate().then((formData) => { that.$refs.exitForm.validate().then((formData) => {
console.log(formData); console.log("formData", formData);
if (!that.phoneReg.test(formData.phone)) { if (!that.phoneReg.test(formData.phone)) {
uni.showToast({ uni.showToast({
icon: "none", icon: "none",
@ -292,12 +292,12 @@
that.$refs.popup.close(); that.$refs.popup.close();
// idid // idid
that.$api.exitMaterial that.$api.exitMaterial
.ifAgreement({ .ifAgreementNew({
unitId: formData.unitId, unitId: formData.unitId,
projectId: formData.lotId, projectId: formData.lotId,
}) })
.then((res) => { .then((res) => {
console.log(res); console.log("判断协议问题成功", res);
if (res.data.code == 200) { if (res.data.code == 200) {
if (res.data.data.agreementId != null) { if (res.data.data.agreementId != null) {
that.newAdd.agreementId = that.newAdd.agreementId =
@ -310,7 +310,10 @@
that.newAdd.backTime = that.newAdd.backTime =
formData.exitTime; formData.exitTime;
that.newAdd.remark = formData.remark; that.newAdd.remark = formData.remark;
console.log(that.newAdd); console.log(
"退料参数====",
that.newAdd
);
that.$api.exitMaterial that.$api.exitMaterial
.newExitList(that.newAdd) .newExitList(that.newAdd)
.then((res) => { .then((res) => {
@ -334,6 +337,7 @@
} }
}) })
.catch((err) => { .catch((err) => {
console.log("判断协议问题失败", err);
console.log(err); console.log(err);
}); });
} }

View File

@ -1,7 +1,10 @@
<template> <template>
<view> <view>
<view class="dataInfo"> <view class="dataInfo">
<view class="dataList" v-for="(item,index) in searchData" :key="index"> <view
class="dataList"
v-for="(item, index) in searchData"
:key="index">
<checkbox-group @change="checkClick(item)"> <checkbox-group @change="checkClick(item)">
<checkbox :checked="item.checked" /> <checkbox :checked="item.checked" />
</checkbox-group> </checkbox-group>
@ -10,14 +13,14 @@
<image :src="item.photoUrl"></image> <image :src="item.photoUrl"></image>
</view> </view>
<view class="text"> <view class="text">
<text>{{item.parentName}}</text> <text>{{ item.parentName }}</text>
<text>规格{{item.typeName}}</text> <text>规格{{ item.typeName }}</text>
<!-- <text>{{item.price}}</text> --> <!-- <text>{{item.price}}</text> -->
</view> </view>
</view> </view>
<view class="action"> <view class="action">
<text @click="reduce(item)">-</text> <text @click="reduce(item)">-</text>
<text>{{item.bookNum}}</text> <text>{{ item.bookNum }}</text>
<text @click="add(item)">+</text> <text @click="add(item)">+</text>
</view> </view>
</view> </view>
@ -40,38 +43,66 @@
</view> </view>
</view> </view>
</view> </view>
<uni-popup <uni-popup ref="popup" type="center" :mask-click="false">
ref="popup"
type="center"
:mask-click="false"
>
<view class="popup"> <view class="popup">
<view class="pop-top"> <view class="pop-top">
<h4>部门工程选择</h4> <h4>部门工程选择</h4>
<uni-icons <uni-icons
style="color: #AAAAAA; font-weight: bold;" style="color: #aaaaaa; font-weight: bold"
type="closeempty" type="closeempty"
size="32" size="32"
@click="closePopup" @click="closePopup">
>
</uni-icons> </uni-icons>
</view> </view>
<view class="select-area"> <view class="select-area">
<uni-forms ref="deptForm" :modelValue="deptFormData" :rules="rules"> <uni-forms
<uni-forms-item name="deptName" required label="选择部门" label-width="100"> ref="deptForm"
:modelValue="deptFormData"
:rules="rules">
<uni-forms-item
name="leaseType"
required
label="领用类型"
label-width="100">
<uni-data-select
v-model="deptFormData.leaseType"
:localdata="leaseTypeRange"></uni-data-select>
</uni-forms-item>
<uni-forms-item
v-if="deptFormData.leaseType == 1"
name="costBearingParty"
required
label="费用承担方"
label-width="100">
<uni-data-select
v-model="deptFormData.costBearingParty"
:localdata="
costBearingPartyRange
"></uni-data-select>
</uni-forms-item>
<uni-forms-item
name="deptName"
required
label="选择部门"
label-width="100">
<uni-data-select <uni-data-select
v-model="deptFormData.deptName" v-model="deptFormData.deptName"
:localdata="deptRange" :localdata="deptRange"
@change="deptChange" @change="deptChange"></uni-data-select>
></uni-data-select>
</uni-forms-item> </uni-forms-item>
<uni-forms-item name="projName" required label="选择工程" label-width="100"> <uni-forms-item
name="projName"
required
label="选择工程"
label-width="100">
<uni-data-select <uni-data-select
v-model="deptFormData.projName" v-model="deptFormData.projName"
:localdata="projRange" :localdata="projRange"
></uni-data-select> @change="projChange"></uni-data-select>
</uni-forms-item> </uni-forms-item>
<button class="submit-btn" @click="formSubmit">保存</button> <button class="submit-btn" @click="formSubmit">
保存
</button>
</uni-forms> </uni-forms>
</view> </view>
</view> </view>
@ -79,7 +110,7 @@
</view> </view>
</template> </template>
<script> <script>
import { basePath } from '../../public'; import { basePath } from "../../public";
export default { export default {
data() { data() {
return { return {
@ -88,40 +119,55 @@ import { basePath } from '../../public';
list: [], list: [],
delList: [], delList: [],
delArr: [], delArr: [],
totalFine: '', totalFine: "",
totalGoods: [], totalGoods: [],
sendData: {}, sendData: {},
deptFormData: { deptFormData: {
deptName: '', deptName: "",
projName: '', projName: "",
agreementId: null, agreementId: null,
agreementCode: null agreementCode: null,
leaseType: 0,
costBearingParty: "",
unitId: "",
}, },
deptRange: [ deptRange: [],
leaseTypeRange: [
{ text: "工程租赁", value: 0 },
{ text: "长期领用", value: 1 },
], ],
projRange: [ costBearingPartyRange: [
{ text: "01", value: "01" },
{ text: "03", value: "03" },
], ],
projRange: [],
rules: { rules: {
deptName: { deptName: {
rules: [ rules: [
{ {
required: true, required: true,
errorMessage: '请选择部门!' errorMessage: "请选择部门!",
} },
] ],
},
leaseType: {
rules: [
{
required: true,
errorMessage: "请选择租赁方式!",
},
],
}, },
projName: { projName: {
rules: [ rules: [
{ {
required: true, required: true,
errorMessage: '请选择工程!' errorMessage: "请选择工程!",
}
]
}
}, },
} ],
},
},
};
}, },
computed: { computed: {
totalPrice() { totalPrice() {
@ -129,13 +175,14 @@ import { basePath } from '../../public';
var str = 0; var str = 0;
for (var i = 0; i < this.searchData.length; i++) { for (var i = 0; i < this.searchData.length; i++) {
if (this.searchData[i].checked) { if (this.searchData[i].checked) {
str += this.searchData[i].num * this.searchData[i].price; str +=
this.searchData[i].num * this.searchData[i].price;
} }
} }
this.totalFine = str this.totalFine = str;
return str; return str;
}, },
searchData: function() { searchData: function () {
// //
if (!this.inputs) { if (!this.inputs) {
return this.list; return this.list;
@ -146,221 +193,262 @@ import { basePath } from '../../public';
}, },
}, },
methods: { methods: {
add(item) { // async projChange(e) {
let that = this // console.log(e, "====");
let num = item.bookNum const { data: res } =
item.bookNum = num + 1 await this.$api.exitMaterial.ifAgreementNew({
that.$api.fetchMaterial.itemNumChange({ projectId: e,
id: item.id, unitId: this.deptFormData.unitId,
bookNum: item.bookNum });
}).then(res => {
console.log(res); this.deptFormData.agreementCode = res.data.agreementCode;
}) this.deptFormData.agreementId = res.data.agreementId;
console.log(res, "获取协议id");
}, },
reduce(item) { // add(item) {
let that = this //
let num = item.bookNum let that = this;
if (num > 1) { let num = item.bookNum;
num -= 1 item.bookNum = num + 1;
} else if (num = 1) { that.$api.fetchMaterial
uni.showToast({ .itemNumChange({
icon: 'none',
title: "该器具无法再减少"
})
}
item.bookNum = num
that.$api.fetchMaterial.itemNumChange({
id: item.id, id: item.id,
bookNum: item.bookNum bookNum: item.bookNum,
}).then(res => {
console.log(res);
}) })
.then((res) => {
console.log(res);
});
},
reduce(item) {
//
let that = this;
let num = item.bookNum;
if (num > 1) {
num -= 1;
} else if ((num = 1)) {
uni.showToast({
icon: "none",
title: "该器具无法再减少",
});
}
item.bookNum = num;
that.$api.fetchMaterial
.itemNumChange({
id: item.id,
bookNum: item.bookNum,
})
.then((res) => {
console.log(res);
});
}, },
// //
checkClick(item) { checkClick(item) {
item.checked = !item.checked item.checked = !item.checked;
if (!item.checked) { if (!item.checked) {
this.allChecked = false this.allChecked = false;
} else { } else {
// //
const goods = this.list.every(item => { const goods = this.list.every((item) => {
return item.checked === true return item.checked === true;
}) });
if (goods) { if (goods) {
this.allChecked = true this.allChecked = true;
} else { } else {
this.allChecked = false this.allChecked = false;
} }
} }
}, },
// //
checkAll() { checkAll() {
this.allChecked = !this.allChecked this.allChecked = !this.allChecked;
if (this.allChecked) { if (this.allChecked) {
this.list.map(item => { this.list.map((item) => {
item.checked = true item.checked = true;
}) });
} else { } else {
this.list.map(item => { this.list.map((item) => {
item.checked = false item.checked = false;
}) });
} }
}, },
finishCart () { finishCart() {
let that = this let that = this;
that.totalGoods = that.list.filter((item) => { that.totalGoods = that.list.filter((item) => {
return item.checked == true return item.checked == true;
}) });
if (that.totalGoods.length == 0) { if (that.totalGoods.length == 0) {
uni.showToast({ uni.showToast({
icon: 'none', icon: "none",
title: '未选择任何商品!' title: "未选择任何商品!",
}) });
} else { } else {
that.$refs.popup.open() that.$refs.popup.open();
} }
}, },
formatDate (value) { formatDate(value) {
if (typeof (value) == 'undefined') { if (typeof value == "undefined") {
return '' return "";
} else { } else {
let date = new Date(parseInt(value)) let date = new Date(parseInt(value));
let y = date.getFullYear() let y = date.getFullYear();
let MM = date.getMonth() + 1 let MM = date.getMonth() + 1;
MM = MM < 10 ? ('0' + MM) : MM MM = MM < 10 ? "0" + MM : MM;
let d = date.getDate() let d = date.getDate();
d = d < 10 ? ('0' + d) : d d = d < 10 ? "0" + d : d;
let h = date.getHours() let h = date.getHours();
h = h < 10 ? ('0' + h) : h h = h < 10 ? "0" + h : h;
let m = date.getMinutes() let m = date.getMinutes();
m = m < 10 ? ('0' + m) : m m = m < 10 ? "0" + m : m;
let s = date.getSeconds() let s = date.getSeconds();
s = s < 10 ? ('0' + s) : s s = s < 10 ? "0" + s : s;
return y + '-' + MM + '-' + d + ' ' + h + ':' + m + ':' + s return y + "-" + MM + "-" + d + " " + h + ":" + m + ":" + s;
} }
}, },
closePopup () { closePopup() {
this.$refs.popup.close() this.$refs.popup.close();
}, },
async getgreementId(){ async getgreementId() {
const params = { const params = {
unitId:this.deptFormData.deptName, unitId: this.deptFormData.deptName,
projectId:this.deptFormData.projName projectId: this.deptFormData.projName,
} };
const res = await this.$api.exitMaterial.ifAgreement(params) const res = await this.$api.exitMaterial.ifAgreement(params);
if(res.data.code == 200){ if (res.data.code == 200) {
this.deptFormData = { ...this.deptFormData,...res.data.data } this.deptFormData = {
}else{ ...this.deptFormData,
this.deptFormData.deptName = '' ...res.data.data,
this.deptFormData.projName = '' };
} else {
this.deptFormData.deptName = "";
this.deptFormData.projName = "";
uni.showToast({ uni.showToast({
duration:1000, duration: 1000,
title:'当前单位和工程未上传协议' title: "当前单位和工程未上传协议",
}) });
} }
console.log('getgreementId ==============',res); console.log("getgreementId ==============", res);
}, },
async formSubmit () { async formSubmit() {
await this.getgreementId() // await this.getgreementId();
if(this.deptFormData.deptName = ''){ // if ((this.deptFormData.deptName = "")) {
return; // return;
} // }
let that = this let that = this;
that.$refs.deptForm.validate().then(formData => { that.$refs.deptForm.validate().then((formData) => {
console.log(formData, that.totalGoods); console.log(formData, that.totalGoods);
that.totalGoods = that.totalGoods.map((item) => { that.totalGoods = that.totalGoods.map((item) => {
return { return {
id: item['id'], id: item["id"],
createBy: uni.getStorageSync('userInfo').sysUser.userName, createBy:
companyId: item['companyId'], uni.getStorageSync("userInfo").sysUser.userName,
status: '0', companyId: item["companyId"],
status: "0",
// createTime: that.formatDate(new Date().getTime()), // createTime: that.formatDate(new Date().getTime()),
typeId: item['typeId'], typeId: item["typeId"],
preNum: item['bookNum'] preNum: item["bookNum"],
} };
}) });
that.sendData = { that.sendData = {
companyId: uni.getStorageSync('userInfo').sysUser.companyId, companyId:
createBy: uni.getStorageSync('userInfo').sysUser.userName, uni.getStorageSync("userInfo").sysUser.companyId,
createBy:
uni.getStorageSync("userInfo").sysUser.userName,
unitId: formData.deptName, unitId: formData.deptName,
projectId: formData.projName, projectId: formData.projName,
agreementId: that.deptFormData.agreementId, agreementId: that.deptFormData.agreementId,
agreementCode: that.deptFormData.agreementCode, agreementCode: that.deptFormData.agreementCode,
leaseType: that.deptFormData.leaseType,
costBearingParty: that.deptFormData.costBearingParty,
taskType: 29, taskType: 29,
taskStatus: 30, types: 2,
taskStatus: 31,
// createTime: that.formatDate(new Date().getTime()), // createTime: that.formatDate(new Date().getTime()),
leaseApplyInfo: { leaseApplyInfo: {
leasePerson: uni.getStorageSync('userInfo').sysUser.userName, leasePerson:
phone: uni.getStorageSync('userInfo').sysUser.phonenumber uni.getStorageSync("userInfo").sysUser.userName,
phone: uni.getStorageSync("userInfo").sysUser
.phonenumber,
}, },
leaseApplyDetails: that.totalGoods leaseApplyDetails: that.totalGoods,
} };
console.log('that.sendData =================== ',that.sendData); console.log(
"that.sendData =================== ",
that.sendData
);
// //
that.$api.fetchMaterial.subCart(that.sendData).then(res => { that.$api.fetchMaterial
.subCart(that.sendData)
.then((res) => {
console.log(res); console.log(res);
if (res.data.code == 200) { if (res.data.code == 200) {
uni.showToast({ uni.showToast({
icon: 'none', icon: "none",
title: res.data.msg, title: res.data.msg,
success: () => { success: () => {
uni.redirectTo({ uni.redirectTo({
url: '/pages/orderCart/orderCart' url: "/pages/orderCart/orderCart",
}) });
} },
}) });
} else { } else {
uni.showToast({ uni.showToast({
icon: 'none', icon: "none",
title:res.data.msg title: res.data.msg,
}) });
} }
}).catch(err => { })
.catch((err) => {
console.log(err); console.log(err);
}) });
that.$refs.popup.close() that.$refs.popup.close();
}) });
}, },
deptChange (e) { deptChange(e) {
let that = this this.deptFormData.unitId = e;
let that = this;
console.log(e); console.log(e);
// //
this.$api.fetchMaterial.getProjList({ this.$api.fetchMaterial
id: e .getProjList(
}, null).then(res => { {
id: e,
},
null
)
.then((res) => {
console.log(res); console.log(res);
if (res.data.code == 200) { if (res.data.code == 200) {
that.projRange = res.data.data.map((item) => { that.projRange = res.data.data.map((item) => {
return { return {
text: item['name'], text: item["name"],
value: item['id'] value: item["id"],
};
});
} }
}) })
} .catch((err) => {});
}).catch(err => {
})
}
}, },
},
onNavigationBarButtonTap() { onNavigationBarButtonTap() {
let that = this let that = this;
that.delArr = [] that.delArr = [];
let isChecked = that.list.every((item) => { let isChecked = that.list.every((item) => {
return item.checked == false return item.checked == false;
}) });
if (that.list.length != 0 && isChecked == false) { if (that.list.length != 0 && isChecked == false) {
uni.showModal({ uni.showModal({
title: '删除商品', title: "删除商品",
content: '确认删除商品吗?', content: "确认删除商品吗?",
success: (res) => { success: (res) => {
if (res.confirm) { if (res.confirm) {
that.delList = that.list.filter((item) => { that.delList = that.list.filter((item) => {
return item.checked != false return item.checked != false;
}) });
/* that.list = that.list.filter((item) => { /* that.list = that.list.filter((item) => {
return item.checked == false return item.checked == false
}) */ }) */
@ -369,38 +457,39 @@ import { basePath } from '../../public';
title: '商品删除成功!' title: '商品删除成功!'
}) */ }) */
for (let i = 0; i < that.delList.length; i++) { for (let i = 0; i < that.delList.length; i++) {
that.delArr.push(that.delList[i].id) that.delArr.push(that.delList[i].id);
} }
that.$api.fetchMaterial.delCart(JSON.stringify( that.$api.fetchMaterial
that.delArr .delCart(JSON.stringify(that.delArr))
)).then(res => { .then((res) => {
console.log(res); console.log(res);
if (res.data.code == 200) { if (res.data.code == 200) {
uni.showToast({ uni.showToast({
icon: 'none', icon: "none",
title: res.data.msg, title: res.data.msg,
success: () => { success: () => {
uni.redirectTo({ uni.redirectTo({
url: '/pages/orderCart/orderCart' url: "/pages/orderCart/orderCart",
}) });
} },
}) });
} else { } else {
uni.showToast({ uni.showToast({
icon: 'none', icon: "none",
title: '删除商品失败!' title: "删除商品失败!",
}) });
} }
}).catch(err => { })
.catch((err) => {
console.log(err); console.log(err);
}) });
} }
} },
}) });
} }
}, },
onShow() { onShow() {
let that = this let that = this;
/* if (uni.getStorageSync('goodList').length != 0) { /* if (uni.getStorageSync('goodList').length != 0) {
that.list = uni.getStorageSync('goodList') that.list = uni.getStorageSync('goodList')
} else { } else {
@ -410,44 +499,49 @@ import { basePath } from '../../public';
}) })
} */ } */
// //
that.$api.fetchMaterial.getDeptList().then(res => { that.$api.fetchMaterial
.getDeptList()
.then((res) => {
if (res.data.code == 200) { if (res.data.code == 200) {
that.deptRange = res.data.data.map((item) => { that.deptRange = res.data.data.map((item) => {
return { return {
text: item['name'], text: item["name"],
value: item['id'] value: item["id"],
} };
}) });
console.log(that.deptRange); console.log(that.deptRange);
} }
}).catch(err => {
console.log(err);
}) })
.catch((err) => {
console.log(err);
});
// //
that.$api.fetchMaterial.getCartDetail().then(res => { that.$api.fetchMaterial
.getCartDetail()
.then((res) => {
if (res.data.code == 200) { if (res.data.code == 200) {
for (let i = 0; i < res.data.data.length; i++) { for (let i = 0; i < res.data.data.length; i++) {
res.data.data[i].checked = false res.data.data[i].checked = false;
} }
that.list = res.data.data that.list = res.data.data;
} }
console.log(that.list); console.log(that.list);
if (that.list.length == 0) { if (that.list.length == 0) {
uni.showToast({ uni.showToast({
icon: 'none', icon: "none",
title: '预约车内暂无商品!' title: "预约车内暂无商品!",
}) });
} }
}).catch(err => { })
.catch((err) => {
console.log(err); console.log(err);
}) });
} },
} };
</script> </script>
<style> <style>
body{ body {
box-sizing: border-box; box-sizing: border-box;
padding-bottom: 10vh; padding-bottom: 10vh;
} }
@ -459,7 +553,7 @@ import { basePath } from '../../public';
/deep/uni-checkbox .uni-checkbox-input.uni-checkbox-input-checked { /deep/uni-checkbox .uni-checkbox-input.uni-checkbox-input-checked {
border-color: #ddd; border-color: #ddd;
color: #fff !important; color: #fff !important;
background-color: #2DCF8C !important; background-color: #2dcf8c !important;
} }
/deep/uni-checkbox .uni-checkbox-input { /deep/uni-checkbox .uni-checkbox-input {
@ -498,8 +592,6 @@ import { basePath } from '../../public';
height: 34rpx; height: 34rpx;
} }
.dataInfo { .dataInfo {
width: 95%; width: 95%;
margin: 0 auto; margin: 0 auto;
@ -509,7 +601,7 @@ import { basePath } from '../../public';
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
border-bottom: 2px solid #F1F1F1; border-bottom: 2px solid #f1f1f1;
padding: 25rpx 0; padding: 25rpx 0;
} }
@ -541,7 +633,7 @@ import { basePath } from '../../public';
.dataInfo .dataList .action text { .dataInfo .dataList .action text {
font-size: 25rpx; font-size: 25rpx;
color: #000; color: #000;
border: 1px solid #C8C7CC; border: 1px solid #c8c7cc;
display: inline-block; display: inline-block;
line-height: 50rpx; line-height: 50rpx;
width: 60rpx; width: 60rpx;
@ -584,12 +676,11 @@ import { basePath } from '../../public';
.buy .total .price { .buy .total .price {
padding-right: 20rpx; padding-right: 20rpx;
} }
.buy .total .price text { .buy .total .price text {
font-size: 27rpx; font-size: 27rpx;
color: #C8C7CC; color: #c8c7cc;
display: inline-block; display: inline-block;
} }
@ -603,13 +694,13 @@ import { basePath } from '../../public';
color: #fff; color: #fff;
display: inline-block; display: inline-block;
border-radius: 30rpx; border-radius: 30rpx;
background: linear-gradient(#FE4A3F, #FF9600); background: linear-gradient(#fe4a3f, #ff9600);
line-height: 70rpx; line-height: 70rpx;
width: 150rpx; width: 150rpx;
text-align: center; text-align: center;
} }
.popup{ .popup {
width: 80vw; width: 80vw;
height: 50vh; height: 50vh;
background-color: #fff; background-color: #fff;
@ -617,10 +708,10 @@ import { basePath } from '../../public';
overflow: hidden; overflow: hidden;
} }
.popup>.pop-top{ .popup > .pop-top {
width: 100%; width: 100%;
height: 5vh; height: 5vh;
background-color: #F5F5F5; background-color: #f5f5f5;
box-sizing: border-box; box-sizing: border-box;
padding: 0 25rpx; padding: 0 25rpx;
display: flex; display: flex;
@ -628,13 +719,14 @@ import { basePath } from '../../public';
align-items: center; align-items: center;
} }
.popup>.select-area{ .popup > .select-area {
width: 85%; width: 85%;
height: 70%;
margin: 40rpx auto; margin: 40rpx auto;
} }
.popup>.select-area>.submit-btn{ .popup > .select-area > .submit-btn {
background-color: #409EFF; background-color: #409eff;
color: #fff; color: #fff;
} }
</style> </style>

View File

@ -6,10 +6,15 @@
</view> </view>
<h4 class="tit">业务办理</h4> <h4 class="tit">业务办理</h4>
<view class="secs"> <view class="secs">
<!-- <view @click="jumpUrl('fetchMaterial')"> <view
@click="jumpUrl('fetchMaterial')"
v-if="
store.includes('picking:apply:apply') ||
store.includes('*:*:*')
">
<image src="/static/fetchMaterial.png" mode=""></image> <image src="/static/fetchMaterial.png" mode=""></image>
<span>领料申请</span> <span>领料申请</span>
</view> --> </view>
<view <view
@click="jumpUrl('exitMaterial')" @click="jumpUrl('exitMaterial')"
v-if=" v-if="

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -2821,9 +2821,33 @@ var render = function () {
}, },
[ [
_c("v-uni-image", { _c("v-uni-image", {
attrs: { src: "/static/exitMaterial.png", mode: "", _i: 6 }, attrs: {
src: "/static/fetchMaterial.png",
mode: "",
_i: 6,
},
}), }),
_c("span", { attrs: { _i: 7 } }, [_vm._v("退料申请")]), _c("span", { attrs: { _i: 7 } }, [_vm._v("领料申请")]),
],
1
)
: _vm._e(),
_vm._$g(8, "i")
? _c(
"uni-view",
{
attrs: { _i: 8 },
on: {
click: function ($event) {
return _vm.$handleViewEvent($event)
},
},
},
[
_c("v-uni-image", {
attrs: { src: "/static/exitMaterial.png", mode: "", _i: 9 },
}),
_c("span", { attrs: { _i: 10 } }, [_vm._v("退料申请")]),
], ],
1 1
) )
@ -2831,13 +2855,13 @@ var render = function () {
], ],
1 1
), ),
_c("h4", { staticClass: _vm._$g(8, "sc"), attrs: { _i: 8 } }, [ _c("h4", { staticClass: _vm._$g(11, "sc"), attrs: { _i: 11 } }, [
_vm._v("移动办公"), _vm._v("移动办公"),
]), ]),
_c( _c(
"uni-view", "uni-view",
{ staticClass: _vm._$g(9, "sc"), attrs: { _i: 9 } }, { staticClass: _vm._$g(12, "sc"), attrs: { _i: 12 } },
_vm._l(_vm._$g(10, "f"), function (part, index, $20, $30) { _vm._l(_vm._$g(13, "f"), function (part, index, $20, $30) {
return _c( return _c(
"uni-view", "uni-view",
{ {
@ -2845,12 +2869,12 @@ var render = function () {
{ {
name: "show", name: "show",
rawName: "v-show", rawName: "v-show",
value: _vm._$g("10-" + $30, "v-show"), value: _vm._$g("13-" + $30, "v-show"),
expression: "_$g((\"10-\"+$30),'v-show')", expression: "_$g((\"13-\"+$30),'v-show')",
}, },
], ],
key: part, key: part,
attrs: { _i: "10-" + $30 }, attrs: { _i: "13-" + $30 },
on: { on: {
click: function ($event) { click: function ($event) {
return _vm.$handleViewEvent($event) return _vm.$handleViewEvent($event)
@ -2860,13 +2884,13 @@ var render = function () {
[ [
_c("v-uni-image", { _c("v-uni-image", {
attrs: { attrs: {
src: _vm._$g("11-" + $30, "a-src"), src: _vm._$g("14-" + $30, "a-src"),
mode: "", mode: "",
_i: "11-" + $30, _i: "14-" + $30,
}, },
}), }),
_c("span", { attrs: { _i: "12-" + $30 } }, [ _c("span", { attrs: { _i: "15-" + $30 } }, [
_vm._v(_vm._$g("12-" + $30, "t0-0")), _vm._v(_vm._$g("15-" + $30, "t0-0")),
]), ]),
], ],
1 1
@ -2874,31 +2898,13 @@ var render = function () {
}), }),
1 1
), ),
_c("h4", { staticClass: _vm._$g(13, "sc"), attrs: { _i: 13 } }, [ _c("h4", { staticClass: _vm._$g(16, "sc"), attrs: { _i: 16 } }, [
_vm._v("查询"), _vm._v("查询"),
]), ]),
_c( _c(
"uni-view", "uni-view",
{ staticClass: _vm._$g(14, "sc"), attrs: { _i: 14 } }, { staticClass: _vm._$g(17, "sc"), attrs: { _i: 17 } },
[ [
_c(
"uni-view",
{
attrs: { _i: 15 },
on: {
click: function ($event) {
return _vm.$handleViewEvent($event)
},
},
},
[
_c("v-uni-image", {
attrs: { src: "/static/searchProjUsing.png", mode: "", _i: 16 },
}),
_c("span", { attrs: { _i: 17 } }, [_vm._v("工程在用")]),
],
1
),
_c( _c(
"uni-view", "uni-view",
{ {
@ -2909,15 +2915,33 @@ var render = function () {
}, },
}, },
}, },
[
_c("v-uni-image", {
attrs: { src: "/static/searchProjUsing.png", mode: "", _i: 19 },
}),
_c("span", { attrs: { _i: 20 } }, [_vm._v("工程在用")]),
],
1
),
_c(
"uni-view",
{
attrs: { _i: 21 },
on: {
click: function ($event) {
return _vm.$handleViewEvent($event)
},
},
},
[ [
_c("v-uni-image", { _c("v-uni-image", {
attrs: { attrs: {
src: "/static/searchFetchRecord.png", src: "/static/searchFetchRecord.png",
mode: "", mode: "",
_i: 19, _i: 22,
}, },
}), }),
_c("span", { attrs: { _i: 20 } }, [_vm._v("领用记录")]), _c("span", { attrs: { _i: 23 } }, [_vm._v("领用记录")]),
], ],
1 1
), ),
@ -10223,7 +10247,7 @@ var render = function () {
[ [
_c("h4", { attrs: { _i: 26 } }, [_vm._v("部门工程选择")]), _c("h4", { attrs: { _i: 26 } }, [_vm._v("部门工程选择")]),
_c("uni-icons", { _c("uni-icons", {
staticStyle: { color: "#AAAAAA", "font-weight": "bold" }, staticStyle: { color: "#aaaaaa", "font-weight": "bold" },
attrs: { _i: 27 }, attrs: { _i: 27 },
on: { on: {
click: function ($event) { click: function ($event) {
@ -10248,13 +10272,45 @@ var render = function () {
[ [
_c("uni-data-select", { _c("uni-data-select", {
attrs: { _i: 31 }, attrs: { _i: 31 },
model: {
value: _vm._$g(31, "v-model"),
callback: function () {},
expression: "deptFormData.leaseType",
},
}),
],
1
),
_vm._$g(32, "i")
? _c(
"uni-forms-item",
{ attrs: { _i: 32 } },
[
_c("uni-data-select", {
attrs: { _i: 33 },
model: {
value: _vm._$g(33, "v-model"),
callback: function () {},
expression: "deptFormData.costBearingParty",
},
}),
],
1
)
: _vm._e(),
_c(
"uni-forms-item",
{ attrs: { _i: 34 } },
[
_c("uni-data-select", {
attrs: { _i: 35 },
on: { on: {
change: function ($event) { change: function ($event) {
return _vm.$handleViewEvent($event) return _vm.$handleViewEvent($event)
}, },
}, },
model: { model: {
value: _vm._$g(31, "v-model"), value: _vm._$g(35, "v-model"),
callback: function () {}, callback: function () {},
expression: "deptFormData.deptName", expression: "deptFormData.deptName",
}, },
@ -10264,12 +10320,17 @@ var render = function () {
), ),
_c( _c(
"uni-forms-item", "uni-forms-item",
{ attrs: { _i: 32 } }, { attrs: { _i: 36 } },
[ [
_c("uni-data-select", { _c("uni-data-select", {
attrs: { _i: 33 }, attrs: { _i: 37 },
on: {
change: function ($event) {
return _vm.$handleViewEvent($event)
},
},
model: { model: {
value: _vm._$g(33, "v-model"), value: _vm._$g(37, "v-model"),
callback: function () {}, callback: function () {},
expression: "deptFormData.projName", expression: "deptFormData.projName",
}, },
@ -10280,8 +10341,8 @@ var render = function () {
_c( _c(
"v-uni-button", "v-uni-button",
{ {
staticClass: _vm._$g(34, "sc"), staticClass: _vm._$g(38, "sc"),
attrs: { _i: 34 }, attrs: { _i: 38 },
on: { on: {
click: function ($event) { click: function ($event) {
return _vm.$handleViewEvent($event) return _vm.$handleViewEvent($event)
@ -10400,7 +10461,7 @@ if(false) {}
var ___CSS_LOADER_API_IMPORT___ = __webpack_require__(/*! ../../../../HBuilderX.3.98.2023112510/HBuilderX/plugins/uniapp-cli/node_modules/css-loader/dist/runtime/api.js */ 16); var ___CSS_LOADER_API_IMPORT___ = __webpack_require__(/*! ../../../../HBuilderX.3.98.2023112510/HBuilderX/plugins/uniapp-cli/node_modules/css-loader/dist/runtime/api.js */ 16);
exports = ___CSS_LOADER_API_IMPORT___(false); exports = ___CSS_LOADER_API_IMPORT___(false);
// Module // Module
exports.push([module.i, "\nbody{\n\tbox-sizing: border-box;\n\tpadding-bottom: 10vh;\n}\n uni-checkbox .uni-checkbox-input {\n\tborder-radius: 50%;\n}\n uni-checkbox .uni-checkbox-input.uni-checkbox-input-checked {\n\tborder-color: #ddd;\n\tcolor: #fff !important;\n\tbackground-color: #2DCF8C !important;\n}\n uni-checkbox .uni-checkbox-input {\n\tborder-color: #ddd;\n}\n uni-checkbox .uni-checkbox-input:hover {\n\tborder-color: #ddd;\n}\n.search {\n\tpadding-top: 20rpx;\n}\n.search .searchIput {\n\tbackground-color: #e6e6e6;\n\twidth: 95%;\n\tmargin: 0 auto;\n\theight: 72rpx;\n\tline-height: 72rpx;\n\tborder-radius: 50rpx;\n\tpadding: 0 32rpx;\n\tbox-sizing: border-box;\n\tdisplay: flex;\n\talign-items: center;\n}\n.search .searchIput uni-input {\n\tfont-size: 26rpx;\n\twidth: 100%;\n\tcolor: grey;\n}\n.search .searchIput uni-image {\n\twidth: 34rpx;\n\theight: 34rpx;\n}\n.dataInfo {\n\twidth: 95%;\n\tmargin: 0 auto;\n}\n.dataInfo .dataList {\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: space-between;\n\tborder-bottom: 2px solid #F1F1F1;\n\tpadding: 25rpx 0;\n}\n.dataInfo .dataList .details {\n\tdisplay: flex;\n\talign-items: center;\n\tflex: 1;\n\tfont-size: 0;\n}\n.dataInfo .dataList .details .img uni-image {\n\twidth: 200rpx;\n\theight: 140rpx;\n\tpadding: 0 20rpx;\n}\n.dataInfo .dataList .details .text uni-text {\n\tcolor: #000;\n\tfont-size: 23rpx;\n\tdisplay: block;\n\tpadding: 10rpx 0;\n}\n.dataInfo .dataList .details .text uni-text:last-child {\n\t/* color: red; */\n\tfont-size: 25rpx;\n}\n.dataInfo .dataList .action uni-text {\n\tfont-size: 25rpx;\n\tcolor: #000;\n\tborder: 1px solid #C8C7CC;\n\tdisplay: inline-block;\n\tline-height: 50rpx;\n\twidth: 60rpx;\n\ttext-align: center;\n\tbox-sizing: border-box;\n}\n.dataInfo .dataList .action uni-text:nth-child(2) {\n\tborder-left: none;\n\tborder-right: none;\n}\n.buy {\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: space-between;\n\tposition: fixed;\n\tleft: 50%;\n\tbottom: 0;\n\twidth: 95%;\n\t-webkit-transform: translate(-50%, 0);\n\t transform: translate(-50%, 0);\n}\n.buy .checked {\n\tdisplay: flex;\n\talign-items: center;\n}\n.buy .checked uni-text {\n\tfont-size: 25rpx;\n\tcolor: #000;\n\tpadding: 0 12rpx;\n}\n.buy .total {\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: space-between;\n}\n.buy .total .price {\n\tpadding-right: 20rpx;\n}\n.buy .total .price uni-text {\n\tfont-size: 27rpx;\n\tcolor: #C8C7CC;\n\tdisplay: inline-block;\n}\n.buy .total .price uni-text:last-child {\n\tcolor: red;\n\tfont-weight: bold;\n}\n.buy .total .bill uni-text {\n\tfont-size: 25rpx;\n\tcolor: #fff;\n\tdisplay: inline-block;\n\tborder-radius: 30rpx;\n\tbackground: linear-gradient(#FE4A3F, #FF9600);\t\n\tline-height: 70rpx;\n\twidth: 150rpx;\n\ttext-align: center;\n}\n.popup{\n\twidth: 80vw;\n\theight: 50vh;\n\tbackground-color: #fff;\n\tborder-radius: 15rpx;\n\toverflow: hidden;\n}\n.popup>.pop-top{\n\twidth: 100%;\n\theight: 5vh;\n\tbackground-color: #F5F5F5;\n\tbox-sizing: border-box;\n\tpadding: 0 25rpx;\n\tdisplay: flex;\n\tjustify-content: space-between;\n\talign-items: center;\n}\n.popup>.select-area{\n\twidth: 85%;\n\tmargin: 40rpx auto;\n}\n.popup>.select-area>.submit-btn{\n\tbackground-color: #409EFF;\n\tcolor: #fff;\n}\n", ""]); exports.push([module.i, "\nbody {\n box-sizing: border-box;\n padding-bottom: 10vh;\n}\n uni-checkbox .uni-checkbox-input {\n border-radius: 50%;\n}\n uni-checkbox .uni-checkbox-input.uni-checkbox-input-checked {\n border-color: #ddd;\n color: #fff !important;\n background-color: #2dcf8c !important;\n}\n uni-checkbox .uni-checkbox-input {\n border-color: #ddd;\n}\n uni-checkbox .uni-checkbox-input:hover {\n border-color: #ddd;\n}\n.search {\n padding-top: 20rpx;\n}\n.search .searchIput {\n background-color: #e6e6e6;\n width: 95%;\n margin: 0 auto;\n height: 72rpx;\n line-height: 72rpx;\n border-radius: 50rpx;\n padding: 0 32rpx;\n box-sizing: border-box;\n display: flex;\n align-items: center;\n}\n.search .searchIput uni-input {\n font-size: 26rpx;\n width: 100%;\n color: grey;\n}\n.search .searchIput uni-image {\n width: 34rpx;\n height: 34rpx;\n}\n.dataInfo {\n width: 95%;\n margin: 0 auto;\n}\n.dataInfo .dataList {\n display: flex;\n align-items: center;\n justify-content: space-between;\n border-bottom: 2px solid #f1f1f1;\n padding: 25rpx 0;\n}\n.dataInfo .dataList .details {\n display: flex;\n align-items: center;\n flex: 1;\n font-size: 0;\n}\n.dataInfo .dataList .details .img uni-image {\n width: 200rpx;\n height: 140rpx;\n padding: 0 20rpx;\n}\n.dataInfo .dataList .details .text uni-text {\n color: #000;\n font-size: 23rpx;\n display: block;\n padding: 10rpx 0;\n}\n.dataInfo .dataList .details .text uni-text:last-child {\n /* color: red; */\n font-size: 25rpx;\n}\n.dataInfo .dataList .action uni-text {\n font-size: 25rpx;\n color: #000;\n border: 1px solid #c8c7cc;\n display: inline-block;\n line-height: 50rpx;\n width: 60rpx;\n text-align: center;\n box-sizing: border-box;\n}\n.dataInfo .dataList .action uni-text:nth-child(2) {\n border-left: none;\n border-right: none;\n}\n.buy {\n display: flex;\n align-items: center;\n justify-content: space-between;\n position: fixed;\n left: 50%;\n bottom: 0;\n width: 95%;\n -webkit-transform: translate(-50%, 0);\n transform: translate(-50%, 0);\n}\n.buy .checked {\n display: flex;\n align-items: center;\n}\n.buy .checked uni-text {\n font-size: 25rpx;\n color: #000;\n padding: 0 12rpx;\n}\n.buy .total {\n display: flex;\n align-items: center;\n justify-content: space-between;\n}\n.buy .total .price {\n padding-right: 20rpx;\n}\n.buy .total .price uni-text {\n font-size: 27rpx;\n color: #c8c7cc;\n display: inline-block;\n}\n.buy .total .price uni-text:last-child {\n color: red;\n font-weight: bold;\n}\n.buy .total .bill uni-text {\n font-size: 25rpx;\n color: #fff;\n display: inline-block;\n border-radius: 30rpx;\n background: linear-gradient(#fe4a3f, #ff9600);\n line-height: 70rpx;\n width: 150rpx;\n text-align: center;\n}\n.popup {\n width: 80vw;\n height: 50vh;\n background-color: #fff;\n border-radius: 15rpx;\n overflow: hidden;\n}\n.popup > .pop-top {\n width: 100%;\n height: 5vh;\n background-color: #f5f5f5;\n box-sizing: border-box;\n padding: 0 25rpx;\n display: flex;\n justify-content: space-between;\n align-items: center;\n}\n.popup > .select-area {\n width: 85%;\n height: 70%;\n margin: 40rpx auto;\n}\n.popup > .select-area > .submit-btn {\n background-color: #409eff;\n color: #fff;\n}\n", ""]);
// Exports // Exports
module.exports = exports; module.exports = exports;