Browse Source

Merge branch 'dev' into pre-production

pre-production
pref_mail@163.com 12 months ago
parent
commit
4bd5a61885
  1. 70
      src/views/distribution/inventory/distrilbutionBillLadingView.vue
  2. 58
      src/views/distribution/reservation/reservationAddFrom.vue

70
src/views/distribution/inventory/distrilbutionBillLadingView.vue

@ -168,7 +168,7 @@
</basic-container>
<!-- 二维码打印 -->
<el-dialog title="二维码" :visible.sync="dialogVisible" width="780px" v-model="dialogVisible">
<!-- <el-dialog title="二维码" :visible.sync="dialogVisible" width="780px" v-model="dialogVisible">
<div>
<div v-html="html"></div>
</div>
@ -176,7 +176,8 @@
<el-button type="primary" @click="printTemplate"> </el-button>
<el-button @click="dialogVisible = false"> </el-button>
</span>
</el-dialog>
</el-dialog> -->
<MyPrint :html="html" v-model="dialogVisible"></MyPrint>
</template>
<script>
@ -204,7 +205,7 @@ import { getDictionaryBiz } from '@/api/system/dict';
import dayjs from 'dayjs';
import { getToken } from '@/utils/auth';
import NProgress from 'nprogress';
import { downloadXls } from '@/utils/util';
import { downloadXls, hanleTextLineFeed } from '@/utils/util';
import { exportBlob } from '@/api/common';
import { dateNow } from '@/utils/date';
import print from '@/utils/print';
@ -1489,7 +1490,7 @@ export default {
this.onLoad(this.page);
},
//
handleqr(val) {
async handleqr(val) {
console.log(val, 'val');
let qr = '';
let checkcode = [];
@ -1507,48 +1508,33 @@ export default {
qr = checkcode.join(',');
}
try {
this.pageLoading = true;
this.html = '';
const res = await showOrderPackgeCode({
ids: qr,
});
const { code, data } = res.data;
if (code !== 200) return;
this.html = '';
showOrderPackgeCode({
ids: qr,
}).then(res => {
// this.orderPackageCode = res.data
console.log(res.data);
this.html = this.getHtmls(res.data.data.dataList, res.data.data.templateHtml);
this.html = this.getHtmls(data.dataList, data.templateHtml);
this.dialogVisible = true;
});
},
//
printTemplate() {
let LODOP = getLodop();
if (this.selectionList.length === 0) {
this.$message.warning('请选择至少一条数据');
return;
}
const nodeList = document.querySelectorAll('.printNode > div');
await this.$nextTick();
// getPrintTemplate(this.ids).then(res => {
// let templateData = res.data.data;
// let templateData = "res.data.data";
// console.log(templateData);
LODOP.PRINT_INITA('测试预览功能');
// LODOP.PRINT_INITA("");
// LODOP.SET_PRINT_PAGESIZE(1, 0, 0, 'A4');
LODOP.SET_PRINT_MODE('WINDOW_DEFPRINTER', 'Deli DL-888T');
LODOP.SET_PRINT_PAGESIZE(2, '210mm', '50mm', '');
LODOP.SET_SHOW_MODE('LANDSCAPE_DEFROTATED', 1);
// //
LODOP.SET_PRINT_MODE('WINDOW_DEFPAGESIZE', 1);
// // datahtml
nodeList.forEach(val => {
LODOP.ADD_PRINT_HTM('0%', '0%', '100%', '100%', val.innerHTML);
LODOP.NewPage();
});
LODOP.PREVIEW(); //()
// });
hanleTextLineFeed('category', 14);
hanleTextLineFeed('materialName', 14);
hanleTextLineFeed('qrCode', 18);
hanleTextLineFeed('customer', 45);
} catch (error) {
console.log('error :>> ', error);
} finally {
this.pageLoading = false;
}
},
searchReset() {
this.query = {};
this.page.currentPage = 1;
@ -1697,7 +1683,7 @@ export default {
billLadingId: this.$route.query.id,
};
$_checkBillLadingIsRelease(data).then(res => {
$_checkBillLadingIsRelease(data).then(async res => {
console.log(res, 're====?');
if (!res.data) {
ElMessageBox.confirm('包件未扫描完成,此操作会释放此类包件!是否继续操作?', '操作提示', {
@ -1724,7 +1710,7 @@ export default {
} else {
try {
this.pageLoading = true;
const res = getBillLadingDetail(this.$route.query.id);
const res = await getBillLadingDetail(this.$route.query.id);
const { code } = res.data;
if (code !== 200) return;
this.$message.success('签收成功');

58
src/views/distribution/reservation/reservationAddFrom.vue

@ -2332,52 +2332,46 @@ export default {
this.zeroOrderShow = true;
this.isrReservationEntry = false;
},
submitClient() {
async submitClient() {
if (this.orderList.length) {
let data = {
entityList: [],
};
this.orderList.forEach(item => {
item.customerName = this.clientData.customerName; //
item.customerTelephone = this.clientData.customerTelephone; //
item.customerAddress = this.clientData.customerAddress; //
data['entityList'].push(item);
const _obj = {};
_obj.id = item.id;
_obj.customerName = this.clientData.customerName; //
_obj.customerTelephone = this.clientData.customerTelephone; //
_obj.customerAddress = this.clientData.customerAddress; //
data['entityList'].push(_obj);
});
this.loading = true;
this.dialogVisible = false; //
$_updateBatchClient(data)
.then(res => {
console.log(res, '修改成功');
if (res.data.code == 200) {
ElMessage({
message: res.data.msg,
type: 'success',
});
const res = await $_updateBatchClient(data);
console.log(res, '修改成功');
const { code, msg } = res.data;
if (code !== 200) return;
this.$message.success(msg);
this.onLoadOrder(this.page);
this.orderList = [];
}
})
.catch(() => {
this.loading = false;
})
.finally(() => {});
this.onLoadOrder(this.page);
// this.orderList = [];
} else {
this.loading = true;
this.dialogVisible = false; //
console.log('this.client===============>', this.clientData);
updateClient(this.clientData)
.then(res => {
console.log('res>>>>>>>>>>>', res.data.data);
this.orderList = [];
this.onLoadOrder(this.page);
this.dialogVisible = false;
})
.catch(() => {
this.loading = false;
})
.finally(() => {});
const _obj = {};
_obj.id = this.clientData.id;
_obj.customerName = this.clientData.customerName; //
_obj.customerTelephone = this.clientData.customerTelephone; //
_obj.customerAddress = this.clientData.customerAddress; //
const res = await updateClient(_obj);
this.loading = false;
const { code, data, msg } = res.data;
if (code !== 200) return;
this.$message.success(msg);
// this.orderList = [];
this.onLoadOrder(this.page);
}
},

Loading…
Cancel
Save