合并打包

This commit is contained in:
Teng 2025-11-26 08:40:27 +08:00
parent 7d5f25cc4f
commit 353aa298d9
39 changed files with 89 additions and 157 deletions

View File

@ -1,5 +1,5 @@
// 引入 request 文件
import request from '@/request/guanli.js'
import request from '@/request/index.js'
// 所有信息查询
export const electricityMeterlist = () => {

View File

@ -1,5 +1,5 @@
// 引入 request 文件
import request from '@/request/guanli.js'
import request from '@/request/index.js'
// 查询仓库对应物料
export const queryInvoicingList = (params) => {

View File

@ -207,6 +207,8 @@
uni.setStorageSync('serverUrl', res.result.orgList[0].serverUrl);
uni.setStorageSync('orgList', res.result.orgList);
uni.setStorageSync('orgListName', res.result.orgList[0].departName);
uni.setStorageSync('orgListCode', res.result.orgList[0].orgCode);
allserve.value = res.result.orgList
time.value = Date.now();
@ -218,6 +220,7 @@
} else {
uni.setStorageSync('serverUrl', "");
uni.setStorageSync('orgListName', "");
uni.setStorageSync('orgListCode', "");
allserve.value = [];
uni.showToast({
title: res.result.msg,
@ -281,6 +284,7 @@
const changeServe = (item : any) => {
uni.setStorageSync('serverUrl', item.serverUrl);
uni.setStorageSync('orgListName', item.departName);
uni.setStorageSync('orgListCode', item.orgCode);
setTimeout(() => {
jumpTo(`/pages/watch/index`)
}, 500)

View File

@ -1,5 +1,5 @@
// 引入 request 文件
import request from '@/request/guanli.js'
import request from '@/request/index.js'
// 查询仓库对应物料
export const queryInvoicingList = (params) => {
@ -197,3 +197,21 @@ export const getTreeDataWlnum = (params) => {
data: params,
})
}
//分享的前缀
export const getShareUrlByCode = (params) => {
return request({
url: `/sys/sysDepart/getShareUrlByCode`,
method: 'get',
data: params,
})
}
export const editShareInfo = (params) => {
return request({
url: `${uni.getStorageSync('serverUrl')}/api/pad/invoicing/editShareInfo`,
method: 'post',
data: params,
})
}

View File

@ -24,11 +24,11 @@
<text> 规格型号: {{v.specificationModel}}</text>
</view>
<view>
<text v-if="v.multiUnitType=='1'">采购单价: {{v.oneUnitPrice}} </text>
<text v-if="v.multiUnitType=='1'">采购单价: {{v.oneUnitPrice?Number(v.oneUnitPrice).toFixed(2):""}} </text>
<text v-if="v.multiUnitType=='1'">采购单位: {{ v.oneUnit}}</text>
<text v-if="v.multiUnitType=='2'">采购单价: {{v.twoUnitPrice}} </text>
<text v-if="v.multiUnitType=='2'">采购单价: {{v.twoUnitPrice?Number(v.twoUnitPrice).toFixed(2):""}} </text>
<text v-if="v.multiUnitType=='2'">采购单位: {{ v.twoUnit}}</text>
<text v-if="v.multiUnitType=='3'">采购单价: {{v.referenceUnitPrice}} </text>
<text v-if="v.multiUnitType=='3'">采购单价: {{v.referenceUnitPrice?Number(v.referenceUnitPrice).toFixed(2):""}} </text>
<text v-if="v.multiUnitType=='3'">采购单位: {{ v.materialUnits}}</text>
</view>
<view>

View File

@ -227,8 +227,8 @@
<view class="tags-one">
{{ showvalue?.typeId_dictText }}
</view>
<view class="tags-one" v-if="showvalue.medicationId_dictText">
{{showvalue.medicationId_dictText}}
<view class="tags-one" v-if="showvalue.medicationId_dictText">
{{showvalue.medicationId_dictText}}
</view>
</view>
@ -426,15 +426,15 @@
<view class="mengban" v-if="ification" @click="ification = false"></view>
<classification @confirm="confirm" :show="ification" :typenum="2" :cgdId="plsbuy[lefttarget]?.id">
</classification>
<tanchuang :show="badshow" font="确定要作废这个采购单吗" @back="badshow=false;" @right="zuofei"> </tanchuang>
</view>
</template>
<script setup lang="ts">
import { ref, onMounted, reactive, onBeforeUnmount, computed, nextTick, defineProps } from 'vue';
import { editIzNew, queryInvoicingList, getCgdMaterialTreeData, queryNuInfoByNuId, updateKfstatus, queryCgdList, queryCgdInfoList, queryWlInfoByWlId, voidedCgdMain } from './api/lunpan.js'
import { editIzNew, queryInvoicingList, getCgdMaterialTreeData, queryNuInfoByNuId, updateKfstatus, queryCgdList, queryCgdInfoList, queryWlInfoByWlId, voidedCgdMain, getShareUrlByCode, editShareInfo } from './api/lunpan.js'
import { onShow, onLoad, onHide, onPageScroll } from "@dcloudio/uni-app"
import classification from './components/cgdclass.vue'
import nomessageimge from '@/pages/procurement/components/nomessage.vue';
@ -513,7 +513,7 @@
if (!plzinfo.canpull) return
queryCgdList(plzinfo).then((res : any) => {
plsbuy.value.push(...res.result.records)
if(plzinfo.pageNo==1){
if (plzinfo.pageNo == 1) {
clickLeftMenu(lefttarget.value, plsbuy.value[lefttarget.value])
}
if (res.result.records.length < plzinfo.pageSize) {
@ -523,7 +523,7 @@
}
const lefttarget = ref(0);
const clickLeftMenu = (index : any, item : object) => {
if(lefttarget.value!=index){
if (lefttarget.value != index) {
middletarget.value = 0;
}
let num = Math.ceil((index + 1))
@ -587,7 +587,7 @@
const clickmiddle = (index : number) => {
middletarget.value = index;
showvalue.value = InvoicingList.value[index];
Invoitop.value = Math.floor(index/3) * 105;
Invoitop.value = Math.floor(index / 3) * 105;
Object.assign(form, mobanform)
form.pageSize = -1;
}
@ -652,31 +652,32 @@
}, 100)
}
const clickshare = () => {
uni.share({
provider: "weixin",
scene: "WXSceneSession",
type: 0,
href: `https://www.baidu.com/`,
title: "采购单分享",
summary: "采购单",
imageUrl: "https://qiniu-web-assets.dcloud.net.cn/unidoc/zh/uni@2x.png",
success: function (res) {
console.log("success:");
uni.showToast({
title: res,
icon: 'none', // 'none'
duration: 20000
})
},
fail: function (err) {
console.log("fail:");
uni.showToast({
title: err,
icon: 'none', // 'none'
duration: 20000
editShareInfo({ id: plsbuy.value[lefttarget.value].id }).then((res : any) => {
if (res.success) {
getShareUrlByCode({ orgCode: uni.getStorageSync('orgListCode') }).then((res : any) => {
let href = `${res.shareUrl}/h5/CgdShareInfo?cgdId=${plsbuy.value[lefttarget.value].id}`
uni.share({
provider: "weixin",
scene: "WXSceneSession",
type: 0,
href: href,
title: "采购单分享",
summary: "采购单",
imageUrl: "https://www.focusnu.com/media/logo.png",
success: function (res) {
console.log("success:");
},
fail: function (err) {
console.log("fail:");
}
});
})
}
});
})
}
const badshow = ref(false);
const donghuacs = ref(false)

View File

@ -1,11 +1,11 @@
// 引入 request 文件
import request from '@/request/guanli.js'
import request from '@/request/index.js'
// 以下 api 为博主项目示例,实际与项目相匹配
// 用你给的四个固定值
export const movedirection = (direction,startOrNot) => {
const url = `/iot/tplink/cameraInfo/motionCtrl?deviceIndex=${uni.getStorageSync('saveinit') ? uni.getStorageSync('saveinit'): 5}&direction=${direction}&startOrNot=${startOrNot}&speed=1`;
const url = `https://www.focusnu.com/devopsapi/iot/tplink/cameraInfo/motionCtrl?deviceIndex=${uni.getStorageSync('saveinit') ? uni.getStorageSync('saveinit'): 5}&direction=${direction}&startOrNot=${startOrNot}&speed=1`;
return request({ url, method: 'get' });
}

View File

@ -116,6 +116,7 @@
const changeServe = (item:any) => {
uni.setStorageSync('serverUrl', item.serverUrl);
uni.setStorageSync('orgListName', item.departName);
uni.setStorageSync('orgListCode', item.orgCode);
uni.showToast({
title: '切换机构成功',
icon: 'success', //

View File

@ -1,94 +0,0 @@
// 全局请求封装
const base_url = 'https://www.focusnu.com/devopsapi'
// const base_url = 'http://192.168.2.37:8081/devopsapi'
// const base_url = 'http://localhost:8091/devopsapi'
// 请求超出时间
const timeout = 5000
// 需要修改token和根据实际修改请求头
export default (params) => {
let url = params.url;
let method = params.method || "get";
let data = params.data || {};
let header = {
'X-Access-Token': uni.getStorageSync('token') || '',
'Content-Type': 'application/json;charset=UTF-8',
'Authorization': 'Basic c2FiZXI6c2FiZXJfc2VjcmV0',
// 'Tenant-Id': uni.getStorageSync('tenantId') || 'xxx', // avue配置相关
...params.header
}
return new Promise((resolve, reject) => {
uni.request({
// https开头的不修改不是的话则添加base为啥呢因为有两种base啊
url: /^https?:\/\//.test(url) ? url : base_url + url,
method: method,
header: header,
data: data,
timeout,
success(response) {
const res = response
// 根据返回的状态码做出对应的操作
//获取成功
// console.log(res.statusCode);
if (res.statusCode == 200) {
resolve(res.data);
} else {
console.log("http", /^https?:\/\//.test(url) ? url : base_url + url)
console.log("res",response)
console.log("data",data)
switch (res.statusCode) {
case 401:
uni.showModal({
title: "提示",
content: "登录过期",
showCancel: false,
success() {
uni.clearStorageSync()
setTimeout(() => {
uni.navigateTo({
url: "/pages/login/login",
})
}, 1000);
},
});
break;
case 404:
uni.showToast({
title: '请求地址不存在...',
duration: 2000,
})
break;
default:
uni.showToast({
title: '请重试...',
duration: 2000,
})
break;
}
}
},
fail(err) {
console.log(err)
if (err.errMsg.indexOf('request:fail') !== -1) {
uni.showToast({
title: '网络异常',
icon: "error",
duration: 2000
})
} else {
uni.showToast({
title: '未知异常',
duration: 2000
})
}
reject(err);
},
complete() {
// 不管成功还是失败都会执行
uni.hideLoading();
uni.hideToast();
}
});
}).catch(() => {});
};

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

@ -0,0 +1 @@
.home[data-v-c8064d57]{width:100vw;height:100vh}.tp uni-image[data-v-c8064d57]{width:100%;height:100%}

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

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 100 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 266 KiB

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

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

@ -1 +1 @@
{"version":3,"file":"lunpan.js","sources":["pages/watch/api/lunpan.js"],"sourcesContent":["// 引入 request 文件\r\nimport request from '@/request/guanli.js'\r\n\r\n// 以下 api 为博主项目示例,实际与项目相匹配\r\n\r\n// 用你给的四个固定值\nexport const movedirection = (direction,startOrNot) => {\n const url = `/iot/tplink/cameraInfo/motionCtrl?deviceIndex=${uni.getStorageSync('saveinit') ? uni.getStorageSync('saveinit'): 5}&direction=${direction}&startOrNot=${startOrNot}&speed=1`;\n return request({ url, method: 'get' });\n}\r\n\r\n\r\n// 获取护理单元\r\nexport const queryPadPageList = () => {\r\n\treturn request({\r\n\t\turl: `${uni.getStorageSync('serverUrl')}/api/pad/baseInfo/queryPadPageList`,\r\n\t\tmethod: 'get'\r\n\t})\r\n}"],"names":["uni","request"],"mappings":";;;AAMY,MAAC,gBAAgB,CAAC,WAAU,eAAe;AACrD,QAAM,MAAM,iDAAiDA,cAAAA,MAAI,eAAe,UAAU,IAAIA,oBAAI,eAAe,UAAU,IAAG,CAAC,cAAc,SAAS,eAAe,UAAU;AAC/K,SAAOC,eAAO,QAAC,EAAE,KAAK,QAAQ,MAAO,CAAA;AACvC;AAIY,MAAC,mBAAmB,MAAM;AACrC,SAAOA,uBAAQ;AAAA,IACd,KAAK,GAAGD,cAAG,MAAC,eAAe,WAAW,CAAC;AAAA,IACvC,QAAQ;AAAA,EACV,CAAE;AACF;;;"}
{"version":3,"file":"lunpan.js","sources":["pages/watch/api/lunpan.js"],"sourcesContent":["// 引入 request 文件\r\nimport request from '@/request/index.js'\r\n\r\n// 以下 api 为博主项目示例,实际与项目相匹配\r\n\r\n// 用你给的四个固定值\nexport const movedirection = (direction,startOrNot) => {\n const url = `https://www.focusnu.com/devopsapi/iot/tplink/cameraInfo/motionCtrl?deviceIndex=${uni.getStorageSync('saveinit') ? uni.getStorageSync('saveinit'): 5}&direction=${direction}&startOrNot=${startOrNot}&speed=1`;\n return request({ url, method: 'get' });\n}\r\n\r\n\r\n// 获取护理单元\r\nexport const queryPadPageList = () => {\r\n\treturn request({\r\n\t\turl: `${uni.getStorageSync('serverUrl')}/api/pad/baseInfo/queryPadPageList`,\r\n\t\tmethod: 'get'\r\n\t})\r\n}"],"names":["uni","request"],"mappings":";;;AAMY,MAAC,gBAAgB,CAAC,WAAU,eAAe;AACrD,QAAM,MAAM,kFAAkFA,cAAAA,MAAI,eAAe,UAAU,IAAIA,oBAAI,eAAe,UAAU,IAAG,CAAC,cAAc,SAAS,eAAe,UAAU;AAChN,SAAOC,cAAO,QAAC,EAAE,KAAK,QAAQ,MAAO,CAAA;AACvC;AAIY,MAAC,mBAAmB,MAAM;AACrC,SAAOA,sBAAQ;AAAA,IACd,KAAK,GAAGD,cAAG,MAAC,eAAe,WAAW,CAAC;AAAA,IACvC,QAAQ;AAAA,EACV,CAAE;AACF;;;"}

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

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1 @@
.home[data-v-c8064d57]{width:100vw;height:100vh}.tp uni-image[data-v-c8064d57]{width:100%;height:100%}

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

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 100 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 266 KiB