Browse Source

Merge branch 'dev' into pre-production

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

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

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

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

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

Loading…
Cancel
Save