代码优化

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);
}); });
} }

File diff suppressed because it is too large Load Diff

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
<image src="/static/fetchMaterial.png" mode=""></image> @click="jumpUrl('fetchMaterial')"
<span>领料申请</span> v-if="
</view> --> store.includes('picking:apply:apply') ||
store.includes('*:*:*')
">
<image src="/static/fetchMaterial.png" mode=""></image>
<span>领料申请</span>
</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;