Commit c1225cc8 authored by gengchunlei's avatar gengchunlei

init

parent 1c79d846
NODE_ENV=dev
VUE_APP_BASE_URL1 = http://192.168.1.132:8889
VUE_APP_BASE_URL = https://beta-yjservice.yiboshi.com
VUE_APP_BASE_URL1 = https://yaoju-service.yiboshi.com
NODE_ENV=prod
VUE_APP_PATH = https://ynfymds-service.yiboshi.com
VUE_APP_BASE_URL = https://yaoju-service.yiboshi.com
VUE_APP_BASE_URL1 = https://beta-yjservice.yiboshi.com
VUE_APP_BASE_URL1 = https://yaoju-service.yiboshi.com
VUE_APP_BASE_URL = https://beta-yjservice.yiboshi.com
VUE_APP_BASE_URL1 = https://yyyaoju-service.yyjtzc.com
module.exports = {
presets: [
'@vue/cli-plugin-babel/preset'
],
plugins: [
['import', {
libraryName: 'vant',
libraryDirectory: 'es',
style: true
}, 'vant']
]
}
......@@ -13,6 +13,7 @@
"less": "^3.12.2",
"less-loader": "^7.0.2",
"mint-ui": "^2.2.13",
"vant": "^2.12.45",
"vue": "^2.6.11",
"vue-router": "^3.2.0",
"vue-uweb": "^0.2.2",
......@@ -25,6 +26,7 @@
"@vue/cli-plugin-vuex": "~4.5.0",
"@vue/cli-service": "~4.5.0",
"babel-eslint": "^10.1.0",
"babel-plugin-import": "^1.13.3",
"eslint": "^6.7.2",
"eslint-plugin-vue": "^6.2.2",
"node-sass": "^4.12.0",
......
......@@ -9,7 +9,7 @@ import Router from 'vue-router'
import { InfiniteScroll } from 'mint-ui';
import eventLog from "./utils/directive/eventLog";//有盟事件埋点指令v-log="[]"
import uweb from "vue-uweb";
import './vant/register'
Vue.use(InfiniteScroll);
Vue.use(Router)
Vue.config.productionTip = false
......
......@@ -105,3 +105,8 @@ export const getShortMessage = params => {
export const getCheckShortMessage = params => {
return apiInstance.get(`/stock-info/v1/api/phone-h5/sms/check`, {params})
}
//领取记录报损申请
export const addDestroyApply = params => {
return apiInstance.put(`/stock-info/v1/api/phone-h5/stock-provide-record/loss-reporting`, params)
}
import Vue from 'vue'
import {Button, Popup, Field } from "vant";
Vue.use(Button);
Vue.use(Popup);
Vue.use(Field);
......@@ -15,7 +15,21 @@
>
<div class="content" v-for="item in detailInfo" :key="item.id">
<div class="title" ><span>{{item.medicalName}}</span></div>
<div class="title" style="display:flex;justify-content: space-between;align-items: center">
<div><span>{{item.medicalName}}</span></div>
<div v-if="item.lossReportStatus === 0&&!item.lossAuditStatus && item.lossAuditStatus !==0 && item.isVisit != 1" style="min-width: 46px">
<div style="border: 1px solid #26a2ff;color: #26a2ff;padding: 0px 8px" @click="toLossReport(item)">报损</div>
</div>
<div v-if="item.lossAuditStatus === 0" style="min-width: 42px">
<div style="color: #FA8C16;">待审核</div>
</div>
<div v-if="item.lossAuditStatus === 1" style="min-width: 42px">
<div style="color: #F5222D;">已报损</div>
</div>
<div v-if="item.lossAuditStatus === 2" style="min-width: 60px">
<div style="border: 1px solid #F5222D;color: #F5222D;padding: 0px 8px" @click="toLossReport(item)">已驳回</div>
</div>
</div>
<div class="details">
<div class="item">
<label class="item-left">规格:</label>
......@@ -46,13 +60,74 @@
<div v-if="noDataShow">
<NoData></NoData>
</div>
<van-popup
v-model="popupVisible"
position="right"
:style="{ width: '100%', height: '100%' }"
closeable
>
<div>
<div style="margin-top: 16px;text-align: center;font-size: 18px;color: rgba(69, 90, 100, 0.85);">报损申请</div>
<div>
<div class="flex_start" style="background: #FAAD14;height: 40px" v-if="clickInfo.lossAuditStatus == 2">
<img src="../assets/img/warn_icon.png" style="display: inline-block;width: 20px;height: 20px;margin-left: 16px">
<div style="font-size: 13px;color: #ffffff;margin-left: 6px">{{clickInfo.lossReportReasonAdmin}}</div>
</div>
<div style="margin-top: 12px;font-size: 16px;font-weight: bold;margin-left: 15px;color: rgba(69, 90, 100, 0.6)">领取信息</div>
<div class="content_detail">
<div class="title">
<div><span>{{clickInfo.medicalName}}</span></div>
</div>
<div class="details">
<div class="item">
<label class="item-left">规格:</label>
<label class="item-right">{{clickInfo.specs || '--'}}</label>
</div>
<div class="item">
<label class="item-left">领取数量:</label>
<label class="item-right">{{clickInfo.receivedNum || '--'}} {{clickInfo.receivedUnit}}</label>
</div>
<div class="item">
<label class="item-left">领取时间:</label>
<label class="item-right">{{clickInfo.created || '--'}}</label>
</div>
<div class="item">
<label class="item-left">领取站点:</label>
<label class="item-right">{{clickInfo.netName || '--'}}</label>
</div>
<div class="item">
<label class="item-left">站点类型:</label>
<label class="item-right">{{clickInfo.netTypeName || '--'}}</label>
</div>
</div>
</div>
<div>
<div style="margin-top: 12px;font-size: 16px;font-weight: bold;margin-left: 15px;color: rgba(69, 90, 100, 0.6)">报损原因</div>
<van-field
v-model="lossReportReasonUser"
rows="3"
autosize
type="textarea"
style="border: 1px solid #F3F3F3;width: 90%;margin: 10px auto 0px;padding: 10px;"
placeholder="请输入报损原因"
/>
<div style="width: 200px;margin: 15px auto;">
<mt-button type="primary" @click="addDestroyReport" size="large"> 提交</mt-button>
</div>
</div>
</div>
</div>
</van-popup>
</div>
</div>
</template>
<script>
import {getUserCollectRecord} from '../utils/api';
import {getUserCollectRecord, addDestroyApply} from '../utils/api';
import NoData from "./component/noData";
import { Toast } from 'mint-ui';
import { Indicator } from 'mint-ui';
......@@ -66,6 +141,9 @@
detailInfo: [],
loadText:'加载中...',
noDataShow: false,
popupVisible: false,
lossReportReasonUser: undefined,
clickInfo: {},
param: {
telephone: undefined,
pageIndex: 0,
......@@ -110,6 +188,46 @@
goBack() {
window.history.go(-1)
},
//报损
toLossReport(item) {
this.clickInfo = item
this.popupVisible = true
},
addDestroyReport() {
if (!this.lossReportReasonUser) {
Toast({
message: '请输入报损原因',
duration: 2000,
className: 'toastIndex',
})
return
}
const {telephone, ...others} = this.clickInfo
let par = {
...others,
lossAuditStatus: 0,
lossReportReasonUser: this.lossReportReasonUser,
}
addDestroyApply(par).then(({data}) => {
if (data.code == 'SUCCESS') {
this.detailInfo.forEach(item => {
if (item.id == this.clickInfo.id) {
item.lossAuditStatus = 0
item.lossReportReasonUser = this.lossReportReasonUser
}
})
this.detailInfo = [...this.detailInfo]
this.popupVisible = false
} else {
Toast({
message: '申请失败!',
duration: 2000,
className: 'toastIndex',
})
}
})
}
},
beforeDestroy() {
this.detailInfo = []
......@@ -117,6 +235,11 @@
}
</script>
<style>
.toastIndex {
z-index: 9999!important;
}
</style>
<style scoped>
.content {
width: 90%;
......@@ -126,7 +249,15 @@
border-radius: 1rem;
box-shadow: darkgrey 0px 2px 20px -10px;
}
.content_detail {
width: 90%;
margin: 10px auto 0px;
padding: 10px;
border: 1px solid #F3F3F3;
color: rgba(69, 90, 100, 0.85);
border-radius: 1rem;
/*box-shadow: darkgrey 0px 2px 20px -10px;*/
}
.content .title {
font-weight: bold;
line-height: 1.5;
......@@ -135,6 +266,21 @@
padding: 0px 0px 3px 0px;
}
.content_detail .title {
font-weight: bold;
line-height: 1.5;
font-size: 14px!important;
border-bottom: 1px solid #F3F3F3;
padding: 0px 0px 3px 0px;
}
.content_detail .details .item {
line-height: 24px;
}
.content_detail .details .item .item-right {
float: right;
}
.content .details .item {
line-height: 24px;
}
......@@ -151,4 +297,12 @@
width: 100%;
text-align: center;
}
.bottom_btn {
/*position: fixed;*/
/*z-index: 2;*/
/*bottom: 20px;*/
width: 200px;
margin: 15px auto;
/*margin-left: calc(50% - 100px) ;*/
}
</style>
......@@ -24,25 +24,12 @@ module.exports = {
productionSourceMap: IsProd ? false : true,
lintOnSave:false,
devServer: {
// port: 8082,
open: true,
overlay: {
warning: false,
errors: false
},
https:true,
/* proxy: { //配置跨域
'/api': {
target: 'https://beta-yjservice.yiboshi.com', //真实的后台接口
changOrigin: true, //允许跨域
pathRewrite: {
/!* 重写路径,当我们在浏览器中看到请求的地址为:http://localhost:8080/api/core/getData/userInfo 时
实际上访问的地址是:http://121.121.67.254:8185/core/getData/userInfo,因为重写了 /api
*!/
'^/api': ''
}
},
}*/
},
chainWebpack:(config)=> {
config.plugins.delete('preload');
......
......@@ -842,6 +842,13 @@
"@babel/types" "^7.4.4"
esutils "^2.0.2"
"@babel/runtime@7.x", "@babel/runtime@^7.0.0":
version "7.17.8"
resolved "https://registry.npmmirror.com/@babel/runtime/-/runtime-7.17.8.tgz#3e56e4aff81befa55ac3ac6a0967349fd1c5bca2"
integrity sha512-dQpEpK0O9o6lj6oPu0gRDbbnk+4LeHlNcBpspf6Olzt3GIX4P1lWF1gS+pHLDFlaJvbR6q7jCfQ08zA4QJBnmA==
dependencies:
regenerator-runtime "^0.13.4"
"@babel/runtime@^7.11.0", "@babel/runtime@^7.8.4":
version "7.11.2"
resolved "https://registry.npmjs.org/@babel/runtime/-/runtime-7.11.2.tgz"
......@@ -936,6 +943,11 @@
resolved "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-1.1.3.tgz"
integrity sha512-shAmDyaQC4H92APFoIaVDHCx5bStIocgvbwQyxPRrbUY20V1EYTbSDchWbuwlMG3V17cprZhA6+78JfB+3DTPw==
"@popperjs/core@^2.9.2":
version "2.11.4"
resolved "https://registry.npmmirror.com/@popperjs/core/-/core-2.11.4.tgz#d8c7b8db9226d2d7664553a0741ad7d0397ee503"
integrity sha512-q/ytXxO5NKvyT37pmisQAItCFqA7FD/vNb8dgaJy3/630Fsc+Mz9/9f2SziBoIZ30TJooXyTwZmhi1zjXmObYg==
"@soda/friendly-errors-webpack-plugin@^1.7.1":
version "1.7.1"
resolved "https://registry.npmjs.org/@soda/friendly-errors-webpack-plugin/-/friendly-errors-webpack-plugin-1.7.1.tgz"
......@@ -1133,6 +1145,18 @@
"@types/webpack-sources" "*"
source-map "^0.6.0"
"@vant/icons@^1.7.1":
version "1.7.3"
resolved "https://registry.npmmirror.com/@vant/icons/-/icons-1.7.3.tgz#e51b46065cfde445617401ebe309a33b62a29725"
integrity sha512-tW4EqzxN4kXw1rnlnQJQHofEifPbt/gECOWiibomht8QLyvoGuE4iUmDFS288dJ07ZjuTy0bhdABj0SENo2fmQ==
"@vant/popperjs@^1.1.0":
version "1.1.0"
resolved "https://registry.npmmirror.com/@vant/popperjs/-/popperjs-1.1.0.tgz#b4edee5bbfa6fb18705986e313d4fd5f17942a0f"
integrity sha512-8MD1gz146awV/uPxYjz4pet22f7a9YVKqk7T+gFkWFwT9mEcrIUEg/xPrdOnWKLP9puXyYtm7oVfSDSefZ/p/w==
dependencies:
"@popperjs/core" "^2.9.2"
"@vue/babel-helper-vue-jsx-merge-props@^1.0.0":
version "1.0.0"
resolved "https://registry.npmjs.org/@vue/babel-helper-vue-jsx-merge-props/-/babel-helper-vue-jsx-merge-props-1.0.0.tgz"
......@@ -1897,6 +1921,14 @@ babel-plugin-dynamic-import-node@^2.3.3:
dependencies:
object.assign "^4.1.0"
babel-plugin-import@^1.13.3:
version "1.13.3"
resolved "https://registry.npmmirror.com/babel-plugin-import/-/babel-plugin-import-1.13.3.tgz#9dbbba7d1ac72bd412917a830d445e00941d26d7"
integrity sha512-1qCWdljJOrDRH/ybaCZuDgySii4yYrtQ8OJQwrcDqdt0y67N30ng3X3nABg6j7gR7qUJgcMa9OMhc4AGViDwWw==
dependencies:
"@babel/helper-module-imports" "^7.0.0"
"@babel/runtime" "^7.0.0"
balanced-match@^1.0.0:
version "1.0.0"
resolved "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz"
......@@ -1962,6 +1994,13 @@ binary-extensions@^2.0.0:
resolved "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.1.0.tgz"
integrity sha512-1Yj8h9Q+QDF5FzhMs/c9+6UntbD5MkRfRwac8DoEm9ZfUBZ7tZ55YcGVAzEe4bXsdQHEk+s9S5wsOKVdZrw0tQ==
bindings@^1.5.0:
version "1.5.0"
resolved "https://registry.npmmirror.com/bindings/-/bindings-1.5.0.tgz#10353c9e945334bc0511a6d90b38fbc7c9c504df"
integrity sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==
dependencies:
file-uri-to-path "1.0.0"
block-stream@*:
version "0.0.9"
resolved "https://registry.npmjs.org/block-stream/-/block-stream-0.0.9.tgz"
......@@ -3862,6 +3901,11 @@ file-loader@^4.2.0:
loader-utils "^1.2.3"
schema-utils "^2.5.0"
file-uri-to-path@1.0.0:
version "1.0.0"
resolved "https://registry.npmmirror.com/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz#553a7b8446ff6f684359c445f1e37a05dacc33dd"
integrity sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==
filesize@^3.6.1:
version "3.6.1"
resolved "https://registry.npmjs.org/filesize/-/filesize-3.6.1.tgz"
......@@ -8528,6 +8572,17 @@ validate-npm-package-license@^3.0.1:
spdx-correct "^3.0.0"
spdx-expression-parse "^3.0.0"
vant@^2.12.45:
version "2.12.45"
resolved "https://registry.npmmirror.com/vant/-/vant-2.12.45.tgz#56a4879c827c3519d8ff54e4f55f8dea946e7a82"
integrity sha512-My/Nt2DfzJhjiHVBBlRBzGyMAp3xh670nXqeUynsASnk7of1RGM41GmJVMoMao7TXT9A9NuUHbqiAwR5AJIOcw==
dependencies:
"@babel/runtime" "7.x"
"@vant/icons" "^1.7.1"
"@vant/popperjs" "^1.1.0"
"@vue/babel-helper-vue-jsx-merge-props" "^1.0.0"
vue-lazyload "1.2.3"
vary@~1.1.2:
version "1.1.2"
resolved "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz"
......@@ -8569,6 +8624,11 @@ vue-hot-reload-api@^2.3.0:
resolved "https://registry.npmjs.org/vue-hot-reload-api/-/vue-hot-reload-api-2.3.4.tgz"
integrity sha512-BXq3jwIagosjgNVae6tkHzzIk6a8MHFtzAdwhnV5VlvPTFxDCvIttgSiHWjdGoTJvXtmRu5HacExfdarRcFhog==
vue-lazyload@1.2.3:
version "1.2.3"
resolved "https://registry.npmmirror.com/vue-lazyload/-/vue-lazyload-1.2.3.tgz#901f9ec15c7e6ca78781a2bae4a343686bdedb2c"
integrity sha512-DC0ZwxanbRhx79tlA3zY5OYJkH8FYp3WBAnAJbrcuoS8eye1P73rcgAZhyxFSPUluJUTelMB+i/+VkNU/qVm7g==
vue-lazyload@^1.0.1:
version "1.3.3"
resolved "https://registry.npmjs.org/vue-lazyload/-/vue-lazyload-1.3.3.tgz"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment