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 => { ...@@ -90,4 +90,16 @@ const deliverySign = params => {
}) })
} }
export default { getTypeList, getDeliveryList, addPurchaseOrder, exportExcel, getDeliveryDetail, deliverySignDetail, deliverySign }
\ No newline at end of file \ 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 \ No newline at end of file
<template> <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 class="detail-info">
<div> <div>
发货单号: 发货单号:
...@@ -14,23 +14,45 @@ ...@@ -14,23 +14,45 @@
<span>{{ dayjs(detailInfo.deliveryDate).format('YYYY-MM-DD HH:mm:ss') }}</span> <span>{{ dayjs(detailInfo.deliveryDate).format('YYYY-MM-DD HH:mm:ss') }}</span>
</div> </div>
</div> </div>
<div v-loading="loading || btnLoading">
<div class="table-wrap"> <div class="table-wrap">
<el-form ref="addForm" :model="detailInfo" size="small"> <el-form ref="addForm" :model="detailInfo" size="small">
<GLTable :tableData="detailInfo.deliveryDetailList" :noDataImg="url" :tableParams="tableParams" :hasPage="false"> <GLTable :tableData="detailInfo.deliveryDetailList" :noDataImg="url" :tableParams="tableParams" :hasPage="false">
</GLTable> </GLTable>
</el-form> </el-form>
<div class="sign-box"> <div class="sign-box-wrap">
<div class="red-txt">*请在区域内签字完成</div> <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="background-text">签字区</div>
<div class="signature-container"> <div class="signature-container">
<VueSignaturePad width="100%" height="100%" ref="signaturePad" :options="options" /> <VueSignaturePad width="100%" height="100%" ref="signaturePad" :options="options" />
</div> </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> </div>
</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> </GLDialog>
</template> </template>
...@@ -72,7 +94,11 @@ export default { ...@@ -72,7 +94,11 @@ export default {
velocityFilterWeight: 0.7, velocityFilterWeight: 0.7,
backgroundColor: 'rgba(255, 255, 255, 0.0)' backgroundColor: 'rgba(255, 255, 255, 0.0)'
}, },
loading: false,
btnLoading: false, btnLoading: false,
activeSignIdx: -1,
signList: [],
emptyImgUrl: require('@/assets/empty.png'),
membraneTypeList: membraneTypeList, membraneTypeList: membraneTypeList,
dayjs: dayjs, dayjs: dayjs,
goodsList: [], goodsList: [],
...@@ -109,12 +135,18 @@ export default { ...@@ -109,12 +135,18 @@ export default {
detailInfo: {} detailInfo: {}
} }
}, },
created() { }, mounted() {
this.getSignList()
},
methods: { methods: {
undo() { undo() {
this.$refs.signaturePad.undoSignature() this.$refs.signaturePad.undoSignature()
}, },
clear() { clear() {
if (this.activeSignIdx != -1) {
this.activeSignIdx = -1
return true
}
this.$refs.signaturePad.clearSignature() this.$refs.signaturePad.clearSignature()
}, },
save() { save() {
...@@ -126,7 +158,7 @@ export default { ...@@ -126,7 +158,7 @@ export default {
if (this.btnLoading) { if (this.btnLoading) {
return return
} }
if (isEmpty) { if (isEmpty && this.activeSignIdx == -1) {
this.$message({ this.$message({
message: '请先完成签名', message: '请先完成签名',
type: 'warning', type: 'warning',
...@@ -135,6 +167,9 @@ export default { ...@@ -135,6 +167,9 @@ export default {
return return
} }
console.log(data, '保存图片----') console.log(data, '保存图片----')
if (this.activeSignIdx != -1) {
this.deliverySign(this.signList[this.activeSignIdx].signFileUrl)
} else {
const base64 = 'png@' + data.split('base64,')[1] const base64 = 'png@' + data.split('base64,')[1]
this.loading = true this.loading = true
this.$apis.sysBase.uploadImg({ file: base64, fileType: 'image' }).then(res => { this.$apis.sysBase.uploadImg({ file: base64, fileType: 'image' }).then(res => {
...@@ -143,6 +178,18 @@ export default { ...@@ -143,6 +178,18 @@ export default {
}).catch(() => { }).catch(() => {
this.loading = false 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) { deliverySign(url) {
const params = { const params = {
...@@ -207,6 +254,9 @@ export default { ...@@ -207,6 +254,9 @@ export default {
} }
} }
::v-deep.el-button.is-plain.btn-three {
opacity: 1 !important;
}
.table-wrap { .table-wrap {
border: 1px solid #e5e5e5; border: 1px solid #e5e5e5;
padding: 16px; padding: 16px;
...@@ -218,6 +268,60 @@ export default { ...@@ -218,6 +268,60 @@ export default {
z-index: 9999999; z-index: 9999999;
position: static; 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 { .sign-box {
position: relative; position: relative;
width: 640px; width: 640px;
...@@ -226,7 +330,6 @@ export default { ...@@ -226,7 +330,6 @@ export default {
opacity: 1; opacity: 1;
border: 1px solid #e5e5e5; border: 1px solid #e5e5e5;
background: #fafafa; background: #fafafa;
margin: 24px auto 19px;
.signature-container { .signature-container {
position: relative; position: relative;
...@@ -244,7 +347,6 @@ export default { ...@@ -244,7 +347,6 @@ export default {
color: #ededed; color: #ededed;
font-size: 88px; font-size: 88px;
pointer-events: none; pointer-events: none;
letter-spacing: 32px;
} }
::v-deep .vue-signature-pad { ::v-deep .vue-signature-pad {
......
...@@ -75,7 +75,7 @@ export default { ...@@ -75,7 +75,7 @@ export default {
putStatus: '', putStatus: '',
orderCode: this.$route.query.orderCode ? this.$route.query.orderCode : '', orderCode: this.$route.query.orderCode ? this.$route.query.orderCode : '',
merchantName: '', merchantName: '',
placeOrderTimeStr: [] placeOrderTimeStr: ''
}, },
tableSearchForm: {}, tableSearchForm: {},
id: '', id: '',
...@@ -133,8 +133,7 @@ export default { ...@@ -133,8 +133,7 @@ export default {
label: '发货时间', label: '发货时间',
name: 'placeOrderTimeStr', name: 'placeOrderTimeStr',
type: 'datePicker', type: 'datePicker',
isClear: true, isClear: true
pickerOptions: 'beforeRangePickerOptions'
}, },
{ {
label: '所属订单', label: '所属订单',
...@@ -336,7 +335,7 @@ export default { ...@@ -336,7 +335,7 @@ export default {
}, },
getParams() { getParams() {
var params = JSON.parse(JSON.stringify(this.searchForm)) 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.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' params.deliveryDateEnd = dayjs(this.searchForm.placeOrderTimeStr[1]).format('YYYY-MM-DD') + ' 23:59:59'
} }
...@@ -447,7 +446,7 @@ export default { ...@@ -447,7 +446,7 @@ export default {
putStatus: '', putStatus: '',
orderCode: '', orderCode: '',
merchantName: '', merchantName: '',
placeOrderTimeStr: [] placeOrderTimeStr: ''
} }
this.handleSearch() this.handleSearch()
} }
......
<template> <template>
<el-drawer class="shoppingCartDrawerCon" title="收货地址管理" size="500px" :visible.sync="dialogShow" <el-drawer class="shoppingCartDrawerCon" title="收货地址管理" size="500px" :visible.sync="dialogShow" :direction="direction">
: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">
<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"> <span slot="provincesAndCities">
<!-- slot-scope="scope" --> <!-- slot-scope="scope" -->
<el-cascader v-model="editForm.provincesAndCities" size="mini" ref="cascader" placeholder="请选择 省/市/区" <el-cascader v-model="editForm.provincesAndCities" size="mini" ref="cascader" placeholder="请选择 省/市/区" style="width:350px" :options="provincesAndCities_options" :props="{ label: 'name', value: 'code', children: 'childrenList' }" />
style="width:350px" :options="provincesAndCities_options"
:props="{ label: 'name', value: 'code', children: 'childrenList' }" />
</span> </span>
</glsx-combi-form> </glsx-combi-form>
<div class="footer-btn"> <div class="footer-btn">
...@@ -113,7 +109,7 @@ export default { ...@@ -113,7 +109,7 @@ export default {
this.getAreaInfo() this.getAreaInfo()
if (this.addressInfo) { if (this.addressInfo) {
this.editForm = this.$common.utils.deepClone(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 { } else {
this.editForm = {} this.editForm = {}
} }
...@@ -139,8 +135,8 @@ export default { ...@@ -139,8 +135,8 @@ export default {
this.editForm.provinceName = nodesInfo[0].pathNodes[0].label this.editForm.provinceName = nodesInfo[0].pathNodes[0].label
this.editForm.cityId = nodesInfo[0].pathNodes[1].value this.editForm.cityId = nodesInfo[0].pathNodes[1].value
this.editForm.cityName = nodesInfo[0].pathNodes[1].label this.editForm.cityName = nodesInfo[0].pathNodes[1].label
this.editForm.areaId = nodesInfo[0].pathNodes[2].value this.editForm.areaId = nodesInfo[0].pathNodes[2]?.value || ''
this.editForm.areaName = nodesInfo[0].pathNodes[2].label this.editForm.areaName = nodesInfo[0].pathNodes[2]?.label || ''
}, },
submit() { submit() {
console.log(this.editForm.provincesAndCities) console.log(this.editForm.provincesAndCities)
...@@ -170,7 +166,6 @@ export default { ...@@ -170,7 +166,6 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
.shoppingCartDrawerCon { .shoppingCartDrawerCon {
// position: relative; // position: relative;
::v-deep .el-drawer__header { ::v-deep .el-drawer__header {
border-bottom: 1px solid #e7eaec; border-bottom: 1px solid #e7eaec;
......
...@@ -102,7 +102,7 @@ ...@@ -102,7 +102,7 @@
</span> </span>
<span class="address"> <span class="address">
收货地址: 收货地址:
<span class="label">{{ addressInfo.contactAddress }}</span> <span class="label">{{ addressInfo.provinceName || '' }}{{ addressInfo.cityName || '' }}{{ addressInfo.areaName || '' }}{{ addressInfo.contactAddress }}</span>
</span> </span>
</div> </div>
<!-- <div class="info"> <!-- <div class="info">
...@@ -256,7 +256,7 @@ export default { ...@@ -256,7 +256,7 @@ export default {
label: '采购总价/元', label: '采购总价/元',
prop: 'goodsTotalPrice', prop: 'goodsTotalPrice',
formatter: cellValue => { formatter: cellValue => {
return '¥' + (cellValue.goodsNumber * cellValue.purchaseGoodsInfo.purchasePrice) return '¥' + (cellValue.goodsNumber * cellValue.purchaseGoodsInfo.purchasePrice).toFixed(2)
}, },
width: 120 width: 120
}, },
...@@ -417,7 +417,7 @@ export default { ...@@ -417,7 +417,7 @@ export default {
cityName, cityName,
areaId, areaId,
areaName, 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 remark: this.remarks
} }
// console.log(params) // console.log(params)
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!