Commit 15557d85 by 前端

Merge branch 'SAAS+V5.5.0' into 'master'

上线合并

See merge request !27
2 parents 2594b48f fb0a4f7d
......@@ -90,4 +90,16 @@ const deliverySign = params => {
})
}
export default { getTypeList, getDeliveryList, addPurchaseOrder, exportExcel, getDeliveryDetail, deliverySignDetail, deliverySign }
\ No newline at end of file
// 分页查询签名预设
const getSignList = params => {
params.method = `scrm.api.boutiquecoupon.rop.router.twoCityTale`
params.routerMethod = 'dj.api.smartcarlife.purchaseOrder.preset.sign.page'
return http({
url: 'rop-scrm-boutiquecoupon/router',
method: 'POST',
data: params,
sign: true
})
}
export default { getTypeList, getDeliveryList, addPurchaseOrder, exportExcel, getDeliveryDetail, deliverySignDetail, deliverySign, getSignList }
\ No newline at end of file
<template>
<GLDialog v-if="dialogShow" bigTitle="确认签收" mode="big" :visible.sync="dialogShow" :close-on-click-modal="false" @onCancel="handleDetailClose" @onOk="save">
<GLDialog v-if="dialogShow" bigTitle="确认签收" mode="big" :visible.sync="dialogShow" :close-on-click-modal="false" @onCancel="handleDetailClose">
<div class="detail-info">
<div>
发货单号:
......@@ -14,23 +14,45 @@
<span>{{ dayjs(detailInfo.deliveryDate).format('YYYY-MM-DD HH:mm:ss') }}</span>
</div>
</div>
<div class="table-wrap">
<el-form ref="addForm" :model="detailInfo" size="small">
<GLTable :tableData="detailInfo.deliveryDetailList" :noDataImg="url" :tableParams="tableParams" :hasPage="false">
</GLTable>
</el-form>
<div class="sign-box">
<div class="red-txt">*请在区域内签字完成</div>
<div class="background-text">签字区</div>
<div class="signature-container">
<VueSignaturePad width="100%" height="100%" ref="signaturePad" :options="options" />
</div>
<div class="btns">
<el-button type="text" size="mini" @click="clear">清除</el-button>
<el-button type="text" size="mini" @click="undo">撤销</el-button>
<div v-loading="loading || btnLoading">
<div class="table-wrap">
<el-form ref="addForm" :model="detailInfo" size="small">
<GLTable :tableData="detailInfo.deliveryDetailList" :noDataImg="url" :tableParams="tableParams" :hasPage="false">
</GLTable>
</el-form>
<div class="sign-box-wrap">
<div class="preset-box">
<div class="title">已有签名预设</div>
<div v-if="signList.length" class="sign-img-box">
<div v-for="(item, index) in signList" :key="index">
<img :src="item.signFileUrl" @click="handleSignClick(item, index)" :class="{'active': activeSignIdx == index, 'sign-img': true}" alt="" />
</div>
</div>
<div class="emptyCom" v-else>
<img :src="emptyImgUrl" class="emptyImg" alt="" />
<span class="tips">暂无数据</span>
</div>
</div>
<div v-if="activeSignIdx != -1" class="sign-box">
<img :src="signList[activeSignIdx].signFileUrl" class="check-sign-img" alt="" />
</div>
<div class="sign-box" v-show="activeSignIdx == -1">
<div class="red-txt">*空白区域内写下名字</div>
<div class="background-text">签字区</div>
<div class="signature-container">
<VueSignaturePad width="100%" height="100%" ref="signaturePad" :options="options" />
</div>
</div>
</div>
</div>
</div>
<template slot="footer">
<span class="dialog-footer">
<el-button plain size="small" class="btn-three" @click="clear" :disabled="loading || btnLoading">重写</el-button>
<el-button v-show="activeSignIdx == -1" plain size="small" class="btn-three" style="margin-left: 10px;" @click="undo" :disabled="loading ||btnLoading">撤销</el-button>
<el-button type="primary" size="small" style="margin-left: 10px;" @click="save" v-loading="loading || btnLoading">确定</el-button>
</span>
</template>
</GLDialog>
</template>
......@@ -72,7 +94,11 @@ export default {
velocityFilterWeight: 0.7,
backgroundColor: 'rgba(255, 255, 255, 0.0)'
},
loading: false,
btnLoading: false,
activeSignIdx: -1,
signList: [],
emptyImgUrl: require('@/assets/empty.png'),
membraneTypeList: membraneTypeList,
dayjs: dayjs,
goodsList: [],
......@@ -109,12 +135,18 @@ export default {
detailInfo: {}
}
},
created() { },
mounted() {
this.getSignList()
},
methods: {
undo() {
this.$refs.signaturePad.undoSignature()
},
clear() {
if (this.activeSignIdx != -1) {
this.activeSignIdx = -1
return true
}
this.$refs.signaturePad.clearSignature()
},
save() {
......@@ -126,7 +158,7 @@ export default {
if (this.btnLoading) {
return
}
if (isEmpty) {
if (isEmpty && this.activeSignIdx == -1) {
this.$message({
message: '请先完成签名',
type: 'warning',
......@@ -135,15 +167,30 @@ export default {
return
}
console.log(data, '保存图片----')
const base64 = 'png@' + data.split('base64,')[1]
this.loading = true
this.$apis.sysBase.uploadImg({ file: base64, fileType: 'image' }).then(res => {
console.log(res, 'res----')
this.deliverySign(res)
}).catch(() => {
this.loading = false
if (this.activeSignIdx != -1) {
this.deliverySign(this.signList[this.activeSignIdx].signFileUrl)
} else {
const base64 = 'png@' + data.split('base64,')[1]
this.loading = true
this.$apis.sysBase.uploadImg({ file: base64, fileType: 'image' }).then(res => {
console.log(res, 'res----')
this.deliverySign(res)
}).catch(() => {
this.loading = false
})
}
},
getSignList() {
this.$apis.delivery.getSignList({}).then(res => {
console.log(res.list, 'res----')
this.signList = res.list
})
},
handleSignClick(item, index) {
this.activeSignIdx = index
this.$refs.signaturePad.clearSignature()
},
deliverySign(url) {
const params = {
id: this.info.orderDeliveryId,
......@@ -207,6 +254,9 @@ export default {
}
}
::v-deep.el-button.is-plain.btn-three {
opacity: 1 !important;
}
.table-wrap {
border: 1px solid #e5e5e5;
padding: 16px;
......@@ -218,6 +268,60 @@ export default {
z-index: 9999999;
position: static;
}
.sign-box-wrap {
display: flex;
justify-content: space-between;
height: 226px;
margin: 24px auto 19px;
}
.preset-box {
width: calc(100% - 640px);
.title {
color: #333333;
font-size: 14px;
font-weight: 600;
}
.sign-img-box {
display: flex;
flex-wrap: wrap;
}
.sign-img {
width: 128px;
height: 48px;
cursor: pointer;
border: 1px solid #ffffff;
margin-top: 16px;
}
.sign-img:nth-child(odd) {
margin-right: 14px;
}
.sign-img.active {
border: 1px solid #5850ff;
}
}
.check-sign-img {
width: 640px;
height: 226px;
}
.emptyCom {
display: flex;
flex-direction: column;
justify-items: center;
align-items: center;
margin: 75px auto;
text-align: center;
.emptyImg {
width: 64px;
height: 41px;
}
.tips {
color: #999999;
font-size: 14px;
margin: 16px 0;
}
}
.sign-box {
position: relative;
width: 640px;
......@@ -226,7 +330,6 @@ export default {
opacity: 1;
border: 1px solid #e5e5e5;
background: #fafafa;
margin: 24px auto 19px;
.signature-container {
position: relative;
......@@ -244,7 +347,6 @@ export default {
color: #ededed;
font-size: 88px;
pointer-events: none;
letter-spacing: 32px;
}
::v-deep .vue-signature-pad {
......
......@@ -75,7 +75,7 @@ export default {
putStatus: '',
orderCode: this.$route.query.orderCode ? this.$route.query.orderCode : '',
merchantName: '',
placeOrderTimeStr: []
placeOrderTimeStr: ''
},
tableSearchForm: {},
id: '',
......@@ -133,8 +133,7 @@ export default {
label: '发货时间',
name: 'placeOrderTimeStr',
type: 'datePicker',
isClear: true,
pickerOptions: 'beforeRangePickerOptions'
isClear: true
},
{
label: '所属订单',
......@@ -336,7 +335,7 @@ export default {
},
getParams() {
var params = JSON.parse(JSON.stringify(this.searchForm))
if (this.searchForm.placeOrderTimeStr.length) {
if (this.searchForm.placeOrderTimeStr) {
params.deliveryDateStart = dayjs(this.searchForm.placeOrderTimeStr[0]).format('YYYY-MM-DD') + ' 00:00:00'
params.deliveryDateEnd = dayjs(this.searchForm.placeOrderTimeStr[1]).format('YYYY-MM-DD') + ' 23:59:59'
}
......@@ -447,7 +446,7 @@ export default {
putStatus: '',
orderCode: '',
merchantName: '',
placeOrderTimeStr: []
placeOrderTimeStr: ''
}
this.handleSearch()
}
......
<template>
<el-drawer class="shoppingCartDrawerCon" title="收货地址管理" size="500px" :visible.sync="dialogShow"
:direction="direction">
<glsx-combi-form class="edit-form-container" ref="editFormRef" label-width="100px" default-width="350px"
:form-ref="editChildRef" :form-obj="editForm" :form-data="editFormData" :form-rules="editRule">
<el-drawer class="shoppingCartDrawerCon" title="收货地址管理" size="500px" :visible.sync="dialogShow" :direction="direction">
<glsx-combi-form class="edit-form-container" ref="editFormRef" label-width="100px" default-width="350px" :form-ref="editChildRef" :form-obj="editForm" :form-data="editFormData" :form-rules="editRule">
<span slot="provincesAndCities">
<!-- slot-scope="scope" -->
<el-cascader v-model="editForm.provincesAndCities" size="mini" ref="cascader" placeholder="请选择 省/市/区"
style="width:350px" :options="provincesAndCities_options"
:props="{ label: 'name', value: 'code', children: 'childrenList' }" />
<el-cascader v-model="editForm.provincesAndCities" size="mini" ref="cascader" placeholder="请选择 省/市/区" style="width:350px" :options="provincesAndCities_options" :props="{ label: 'name', value: 'code', children: 'childrenList' }" />
</span>
</glsx-combi-form>
<div class="footer-btn">
......@@ -113,7 +109,7 @@ export default {
this.getAreaInfo()
if (this.addressInfo) {
this.editForm = this.$common.utils.deepClone(this.addressInfo)
this.editForm.provincesAndCities = [String(this.editForm.provinceId), String(this.editForm.cityId), String(this.editForm.areaId)]
this.editForm.provincesAndCities = this.editForm.areaId ? [String(this.editForm.provinceId), String(this.editForm.cityId), String(this.editForm.areaId)] : [String(this.editForm.provinceId), String(this.editForm.cityId)]
} else {
this.editForm = {}
}
......@@ -139,8 +135,8 @@ export default {
this.editForm.provinceName = nodesInfo[0].pathNodes[0].label
this.editForm.cityId = nodesInfo[0].pathNodes[1].value
this.editForm.cityName = nodesInfo[0].pathNodes[1].label
this.editForm.areaId = nodesInfo[0].pathNodes[2].value
this.editForm.areaName = nodesInfo[0].pathNodes[2].label
this.editForm.areaId = nodesInfo[0].pathNodes[2]?.value || ''
this.editForm.areaName = nodesInfo[0].pathNodes[2]?.label || ''
},
submit() {
console.log(this.editForm.provincesAndCities)
......@@ -170,7 +166,6 @@ export default {
<style lang="scss" scoped>
.shoppingCartDrawerCon {
// position: relative;
::v-deep .el-drawer__header {
border-bottom: 1px solid #e7eaec;
......
......@@ -102,7 +102,7 @@
</span>
<span class="address">
收货地址:
<span class="label">{{ addressInfo.contactAddress }}</span>
<span class="label">{{ addressInfo.provinceName || '' }}{{ addressInfo.cityName || '' }}{{ addressInfo.areaName || '' }}{{ addressInfo.contactAddress }}</span>
</span>
</div>
<!-- <div class="info">
......@@ -256,7 +256,7 @@ export default {
label: '采购总价/元',
prop: 'goodsTotalPrice',
formatter: cellValue => {
return '¥' + (cellValue.goodsNumber * cellValue.purchaseGoodsInfo.purchasePrice)
return '¥' + (cellValue.goodsNumber * cellValue.purchaseGoodsInfo.purchasePrice).toFixed(2)
},
width: 120
},
......@@ -417,7 +417,7 @@ export default {
cityName,
areaId,
areaName,
shoppingCarList: this.selectList.map(item => ({ id: item.id, goodsNumber: item.goodsNumber })),
shoppingCarList: this.selectList.map(item => ({ id: item.id, goodsNumber: item.goodsNumber, remark: item.remark })),
remark: this.remarks
}
// console.log(params)
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!