|
@@ -2,32 +2,31 @@
|
|
|
<!-- #ifdef H5 -->
|
|
|
<view class="all-container">
|
|
|
<view class="bg"></view>
|
|
|
- <Loading
|
|
|
- :type="3"
|
|
|
- :loadStatus="loadStatus"
|
|
|
- :showText="errorText"
|
|
|
- />
|
|
|
+ <Loading :type="3" :loadStatus="loadStatus" :showText="errorText" />
|
|
|
<zj-page-layout
|
|
|
v-if="detail"
|
|
|
:isScroll="true"
|
|
|
:hasFooter="true"
|
|
|
:refresherTriggered="refresherTriggered"
|
|
|
- @refresherrefresh="refresherrefresh">
|
|
|
+ @refresherrefresh="refresherrefresh"
|
|
|
+ >
|
|
|
<view class="content-container">
|
|
|
- <view class="status-container">{{detail.flag | statusFilter}}</view>
|
|
|
+ <view class="status-container">{{ detail.flag | statusFilter }}</view>
|
|
|
<view class="product-container card">
|
|
|
<view class="title">
|
|
|
<view class="left">产品信息</view>
|
|
|
- <view class="right">{{detail.goodsType == 'M' ? '辅材' : '配件'}}</view>
|
|
|
+ <view class="right">{{ detail.goodsType == 'M' ? '辅材' : '配件' }}</view>
|
|
|
</view>
|
|
|
<view class="product">
|
|
|
<view class="it" v-for="(item, index) in detail.items" :key="index">
|
|
|
- <view class="name">{{item.goodsName}}<text>×{{detail.salesQty}}{{item.goodsSalesUnit}}</text></view>
|
|
|
- <view class="price">¥{{item.saleAmount | priceFilter}}</view>
|
|
|
+ <view class="name"
|
|
|
+ >{{ item.goodsName }}<text>×{{ detail.salesQty }}{{ item.goodsSalesUnit }}</text></view
|
|
|
+ >
|
|
|
+ <view class="price">¥{{ item.saleAmount | priceFilter }}</view>
|
|
|
</view>
|
|
|
<view class="total">
|
|
|
<view class="text">合计:</view>
|
|
|
- <view class="price">¥{{detail.totalAmount | priceFilter}}</view>
|
|
|
+ <view class="price">¥{{ detail.totalAmount | priceFilter }}</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
@@ -35,12 +34,12 @@
|
|
|
<view class="title">申领信息</view>
|
|
|
<view class="row">
|
|
|
<view class="label">申请单号</view>
|
|
|
- <view class="value">{{detail.salesId}}</view>
|
|
|
+ <view class="value">{{ detail.salesId }}</view>
|
|
|
<view class="tag" @tap="$copy(detail.salesId)">复制</view>
|
|
|
</view>
|
|
|
<view class="row">
|
|
|
<view class="label">购买网点</view>
|
|
|
- <view class="value">{{detail.websitName}}</view>
|
|
|
+ <view class="value">{{ detail.websitName }}</view>
|
|
|
</view>
|
|
|
<view class="row">
|
|
|
<view class="label">出库类型</view>
|
|
@@ -52,19 +51,19 @@
|
|
|
</view>
|
|
|
<view class="row">
|
|
|
<view class="label">出库总价</view>
|
|
|
- <view class="value price">¥{{detail.payValue | priceFilter}}</view>
|
|
|
+ <view class="value price">¥{{ detail.payValue | priceFilter }}</view>
|
|
|
</view>
|
|
|
<view class="row">
|
|
|
<view class="label">备注信息</view>
|
|
|
- <view class="value">{{detail.remark}}</view>
|
|
|
+ <view class="value">{{ detail.remark }}</view>
|
|
|
</view>
|
|
|
<view class="row">
|
|
|
<view class="label">申领人员</view>
|
|
|
- <view class="value">{{detail.workerName}}</view>
|
|
|
+ <view class="value">{{ detail.workerName }}</view>
|
|
|
</view>
|
|
|
<view class="row">
|
|
|
<view class="label">制单时间</view>
|
|
|
- <view class="value">{{detail.createTime}}</view>
|
|
|
+ <view class="value">{{ detail.createTime }}</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
@@ -74,7 +73,7 @@
|
|
|
<view class="left"></view>
|
|
|
<view class="right">
|
|
|
<u-button text="取消订单" @click="cancelOrder"></u-button>
|
|
|
- <u-button type="primary" text="立即支付" @click="toPay"></u-button>
|
|
|
+ <!-- <u-button type="primary" text="立即支付" @click="toPay"></u-button> -->
|
|
|
</view>
|
|
|
</view>
|
|
|
</template>
|
|
@@ -83,97 +82,100 @@
|
|
|
<!-- #endif -->
|
|
|
|
|
|
<!-- #ifndef H5 -->
|
|
|
- <web-view :src="webViewHref(`/packageMaterial/pages/stock/buyDetail`, pam, crossPagePam)" @message="crossPage.$listener"></web-view>
|
|
|
+ <web-view
|
|
|
+ :src="webViewHref(`/packageMaterial/pages/stock/buyDetail`, pam, crossPagePam)"
|
|
|
+ @message="crossPage.$listener"
|
|
|
+ ></web-view>
|
|
|
<!-- #endif -->
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
- // #ifdef H5
|
|
|
- export default {
|
|
|
- filters: {
|
|
|
- statusFilter(val) {
|
|
|
- const MAP = {
|
|
|
- SAVE: '保存',
|
|
|
- SUBMIT: '待支付',
|
|
|
- PAY_NOT_TAKE: '未提货',
|
|
|
- PAY_TAKE: '已完成',
|
|
|
- CANCEL: '已取消',
|
|
|
- }
|
|
|
- return MAP[val];
|
|
|
+// #ifdef H5
|
|
|
+export default {
|
|
|
+ filters: {
|
|
|
+ statusFilter(val) {
|
|
|
+ const MAP = {
|
|
|
+ SAVE: '保存',
|
|
|
+ SUBMIT: '待支付',
|
|
|
+ PAY_NOT_TAKE: '未提货',
|
|
|
+ PAY_TAKE: '已完成',
|
|
|
+ CANCEL: '已取消',
|
|
|
}
|
|
|
- },
|
|
|
+ return MAP[val];
|
|
|
+ }
|
|
|
+ },
|
|
|
|
|
|
- data() {
|
|
|
- return {
|
|
|
- id: null,
|
|
|
- refresherTriggered: false,
|
|
|
- loadStatus: 0,
|
|
|
- errorText: '',
|
|
|
- detail: null,
|
|
|
- }
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ id: null,
|
|
|
+ refresherTriggered: false,
|
|
|
+ loadStatus: 0,
|
|
|
+ errorText: '',
|
|
|
+ detail: null,
|
|
|
+ }
|
|
|
+ },
|
|
|
+
|
|
|
+ onLoad({id}) {
|
|
|
+ this.id = id;
|
|
|
+ this.getDetail();
|
|
|
+ },
|
|
|
+
|
|
|
+ methods: {
|
|
|
+ getDetail() {
|
|
|
+ this.$api.post('/material/salses/detail', {
|
|
|
+ salesId: this.id
|
|
|
+ }).then(res => {
|
|
|
+ this.detail = res.data;
|
|
|
+ this.loadStatus = 0;
|
|
|
+ }).catch(res => {
|
|
|
+ this.errorText = res.message;
|
|
|
+ this.loadStatus = 2;
|
|
|
+ }).finally(res => {
|
|
|
+ this.refresherTriggered = false;
|
|
|
+ })
|
|
|
},
|
|
|
|
|
|
- onLoad({id}) {
|
|
|
- this.id = id;
|
|
|
+ // 下拉刷新
|
|
|
+ refresherrefresh() {
|
|
|
+ this.refresherTriggered = true;
|
|
|
this.getDetail();
|
|
|
},
|
|
|
|
|
|
- methods: {
|
|
|
- getDetail() {
|
|
|
- this.$api.post('/material/salses/detail', {
|
|
|
- salesId: this.id
|
|
|
- }).then(res => {
|
|
|
- this.detail = res.data;
|
|
|
- this.loadStatus = 0;
|
|
|
- }).catch(res => {
|
|
|
- this.errorText = res.message;
|
|
|
- this.loadStatus = 2;
|
|
|
- }).finally(res => {
|
|
|
- this.refresherTriggered = false;
|
|
|
- })
|
|
|
- },
|
|
|
-
|
|
|
- // 下拉刷新
|
|
|
- refresherrefresh() {
|
|
|
- this.refresherTriggered = true;
|
|
|
- this.getDetail();
|
|
|
- },
|
|
|
-
|
|
|
- // 取消订单
|
|
|
- cancelOrder() {
|
|
|
- this.$modal({
|
|
|
- content: '确认取消订单吗?'
|
|
|
- }).then(() => {
|
|
|
- this.$api.post('/material/salses/cancel', {
|
|
|
- salesId: this.id
|
|
|
- }).then(res => {
|
|
|
- this.$successToast();
|
|
|
- this.getDetail();
|
|
|
- })
|
|
|
- }).catch(() => {})
|
|
|
- },
|
|
|
-
|
|
|
- toPay() {
|
|
|
- this.$navToPage({
|
|
|
- url: `/packageMaterial/pages/apply/pay?orderId=${this.id}`
|
|
|
- })
|
|
|
- }
|
|
|
+ // 取消订单
|
|
|
+ cancelOrder() {
|
|
|
+ this.$modal({
|
|
|
+ content: '确认取消订单吗?'
|
|
|
+ }).then(() => {
|
|
|
+ this.$api.post('/material/salses/cancel', {
|
|
|
+ salesId: this.id
|
|
|
+ }).then(res => {
|
|
|
+ this.$successToast();
|
|
|
+ this.getDetail();
|
|
|
+ })
|
|
|
+ }).catch(() => {})
|
|
|
},
|
|
|
- }
|
|
|
|
|
|
- // #endif
|
|
|
- // #ifndef H5
|
|
|
- export default {
|
|
|
- data() {
|
|
|
- return {
|
|
|
- pam: {},
|
|
|
- }
|
|
|
- },
|
|
|
- onLoad(pam) {
|
|
|
- this.pam = pam;
|
|
|
+ toPay() {
|
|
|
+ this.$navToPage({
|
|
|
+ url: `/packageMaterial/pages/apply/pay?orderId=${this.id}`
|
|
|
+ })
|
|
|
}
|
|
|
+ },
|
|
|
+}
|
|
|
+
|
|
|
+// #endif
|
|
|
+// #ifndef H5
|
|
|
+export default {
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ pam: {},
|
|
|
+ }
|
|
|
+ },
|
|
|
+ onLoad(pam) {
|
|
|
+ this.pam = pam;
|
|
|
}
|
|
|
- // #endif
|
|
|
+}
|
|
|
+// #endif
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
@@ -186,7 +188,7 @@
|
|
|
left: 0;
|
|
|
width: 100%;
|
|
|
height: 300rpx;
|
|
|
- background: linear-gradient(179.48deg, rgba(200,224,251,1) 0.45%,rgba(247,247,247,1) 98.96%);
|
|
|
+ background: linear-gradient(179.48deg, rgba(200, 224, 251, 1) 0.45%, rgba(247, 247, 247, 1) 98.96%);
|
|
|
}
|
|
|
.card {
|
|
|
@include zj-card;
|