|
@@ -63,7 +63,7 @@
|
|
|
@click="handleSubmit(true)" native-type="button">保存并打印</van-button>
|
|
|
|
|
|
<van-button size="small" style="border-radius: 5px; width: 35vw;" block type="info"
|
|
|
- @click="handleSubmit(false)" native-type="button">仅保存</van-button>
|
|
|
+ @click="handleSubmit(false)" native-type="button">仅保存</van-button>
|
|
|
</div>
|
|
|
</van-form>
|
|
|
</div>
|
|
@@ -105,14 +105,14 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import { appGetEmployeeInfoByPhone, appGeLogisticsList, appSaveExpressRecord, getSysUserInfoByUserIdAPI, getListOfPrinters, storagePrintSmallTab ,appFindInsideInfoByExpressNo} from '@/api/index'
|
|
|
+import { appGetEmployeeInfoByPhone, appGeLogisticsList, appSaveExpressRecord, getSysUserInfoByUserIdAPI, getListOfPrinters, storagePrintSmallTab, appFindInsideInfoByExpressNo } from '@/api/index'
|
|
|
import { Toast } from 'vant';
|
|
|
import wx from "weixin-jsapi";
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
|
- isPrint:false,//是否需要打印
|
|
|
- expressInfo:{},// 快件信息
|
|
|
+ isPrint: false,//是否需要打印
|
|
|
+ expressInfo: {},// 快件信息
|
|
|
gfg: {},
|
|
|
isCompany: '否',
|
|
|
inputValue: '',//输入手机号后四位聚焦
|
|
@@ -149,7 +149,7 @@ export default {
|
|
|
async mounted() {
|
|
|
this.getUser()
|
|
|
this.floorId = this.$store.state.user.expressScope
|
|
|
- const expressData = await appFindInsideInfoByExpressNo({insideNum:'S6000000363245086'})
|
|
|
+ const expressData = await appFindInsideInfoByExpressNo({ insideNum: 'S6000000363245086' })
|
|
|
this.handleAppFindInsideInfoByExpressNoCallback(expressData)
|
|
|
},
|
|
|
methods: {
|
|
@@ -166,7 +166,7 @@ export default {
|
|
|
result = result1[result1.length - 1];
|
|
|
}
|
|
|
this.object.expressNo = result
|
|
|
- const expressData = await appFindInsideInfoByExpressNo({insideNum:result})
|
|
|
+ const expressData = await appFindInsideInfoByExpressNo({ insideNum: result })
|
|
|
this.handleAppFindInsideInfoByExpressNoCallback(expressData.data)
|
|
|
console.log(expressData)
|
|
|
},
|
|
@@ -177,8 +177,8 @@ export default {
|
|
|
},
|
|
|
|
|
|
// 查询快递单号回调
|
|
|
- handleAppFindInsideInfoByExpressNoCallback(data){
|
|
|
- if(!data) return
|
|
|
+ handleAppFindInsideInfoByExpressNoCallback(data) {
|
|
|
+ if (!data) return
|
|
|
this.expressInfo = data;
|
|
|
this.object.value = this.$store.state.user.company;
|
|
|
this.onGroupObject.phone = data.addressee_phone
|
|
@@ -187,7 +187,7 @@ export default {
|
|
|
this.onGroupObject.mailRoomName = data.mailRoomName
|
|
|
this.onGroupObject.seat_no = data.addressee_seat_no
|
|
|
this.object.remark = data.express_remark
|
|
|
- this.object.radio = data.express_type == '1'? '文件' :'物品'
|
|
|
+ this.object.radio = data.express_type == '1' ? '文件' : '物品'
|
|
|
},
|
|
|
// 手机号点击聚焦
|
|
|
onFocus() {
|
|
@@ -235,7 +235,7 @@ export default {
|
|
|
this.shelf = false;
|
|
|
},
|
|
|
|
|
|
- handleSubmit(isPrint){
|
|
|
+ handleSubmit(isPrint) {
|
|
|
this.isPrint = isPrint;
|
|
|
this.$refs.formRef.submit()
|
|
|
console.log('submit')
|
|
@@ -264,7 +264,7 @@ export default {
|
|
|
...originalObj
|
|
|
}
|
|
|
|
|
|
- if(values.isPayOnDelivery){
|
|
|
+ if (values.isPayOnDelivery) {
|
|
|
// 内部件
|
|
|
value.senderName = this.expressInfo.send_name
|
|
|
value.senderNumber = this.expressInfo.send_phone
|
|
@@ -275,7 +275,7 @@ export default {
|
|
|
this.value14 = this.object.value4
|
|
|
if (res.msg == 'success') {
|
|
|
this.$toast('入库成功')
|
|
|
- if(this.isPrint){
|
|
|
+ if (this.isPrint) {
|
|
|
this.printerGo();
|
|
|
}
|
|
|
this.isPrint = false;
|
|
@@ -296,7 +296,7 @@ export default {
|
|
|
mailFloor: '',
|
|
|
seat_no: '',
|
|
|
},
|
|
|
- this.checkbox = false
|
|
|
+ this.checkbox = false
|
|
|
|
|
|
} else if (res.msg == 'already') {
|
|
|
this.$toast('该账号已添加过')
|
|
@@ -314,11 +314,11 @@ export default {
|
|
|
async printerGo() {
|
|
|
const getPrinters = await getListOfPrinters({})
|
|
|
console.log(getPrinters)
|
|
|
- if(getPrinters.data.length === 0){
|
|
|
+ if (getPrinters.data.length === 0) {
|
|
|
Toast('该用户未绑定打印机')
|
|
|
return;
|
|
|
}
|
|
|
- if(getPrinters.data.length === 1){
|
|
|
+ if (getPrinters.data.length === 1) {
|
|
|
this.onPrinter(getPrinters.data)
|
|
|
return;
|
|
|
}
|