|
@@ -120,10 +120,12 @@
|
|
|
highlight-current-row stripe @select="handleSelect" @select-all="handleSelectAll" show-summary
|
|
|
:summary-method="$getSummaries">
|
|
|
<el-table-column align="center" type="selection" width="55"></el-table-column>
|
|
|
+ <el-table-column align="right" label="打印次数" prop="printNum" min-width="80" show-overflow-tooltip>
|
|
|
+ </el-table-column>
|
|
|
|
|
|
<el-table-column align="left" label="订单类型" prop="orderType" min-width="100" show-overflow-tooltip>
|
|
|
<template slot-scope="scope">
|
|
|
- {{ scope.row.orderType | orderTypeFilter }}
|
|
|
+ {{ scope.row.orderType | orderTypeFilter }}
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column align="left" label="制单日期" prop="createTime" min-width="160" show-overflow-tooltip>
|
|
@@ -133,7 +135,7 @@
|
|
|
<el-table-column align="left" label="发货单号" prop="id" min-width="130" show-overflow-tooltip>
|
|
|
<template slot-scope="scope">
|
|
|
<CopyButton :copyText="scope.row.id" />
|
|
|
- <span>{{ scope.row.id }}</span>
|
|
|
+ <span>{{ scope.row.id }}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column align="left" label="订单号" prop="orderId" min-width="130" show-overflow-tooltip>
|
|
@@ -141,23 +143,24 @@
|
|
|
|
|
|
<CopyButton
|
|
|
:copyText="scope.row.enginOrderType == 'HOME' || scope.row.enginOrderType == 'TRADE' ? scope.row.enginOrderNo : scope.row.mainOrderId" />
|
|
|
- <span>{{ scope.row.enginOrderType == 'HOME' || scope.row.enginOrderType == 'TRADE' ?
|
|
|
- scope.row.enginOrderNo
|
|
|
- : scope.row.mainOrderId
|
|
|
- }}</span>
|
|
|
+ <span>{{ scope.row.enginOrderType == 'HOME' || scope.row.enginOrderType == 'TRADE' ?
|
|
|
+ scope.row.enginOrderNo
|
|
|
+ : scope.row.mainOrderId
|
|
|
+
|
|
|
+ }}</span>
|
|
|
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column align="left" label="经销商编码" prop="customerNumber" min-width="100" show-overflow-tooltip>
|
|
|
<template slot-scope="scope">
|
|
|
<CopyButton :copyText="scope.row.customerNumber" />
|
|
|
- <span>{{ scope.row.customerNumber }}</span>
|
|
|
+ <span>{{ scope.row.customerNumber }}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column align="left" label="经销商名称" prop="customerName" min-width="250" show-overflow-tooltip>
|
|
|
<template slot-scope="scope">
|
|
|
<CopyButton :copyText="scope.row.customerName" />
|
|
|
- <span>{{ scope.row.customerName }}</span>
|
|
|
+ <span>{{ scope.row.customerName }}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column align="left" label="销售类型" prop="saleTypeName" min-width="100" show-overflow-tooltip>
|
|
@@ -165,25 +168,25 @@
|
|
|
<el-table-column align="left" label="物料编码" prop="materialCode" min-width="120" show-overflow-tooltip>
|
|
|
<template slot-scope="scope">
|
|
|
<CopyButton :copyText="scope.row.materialCode" />
|
|
|
- <span>{{ scope.row.materialCode }}</span>
|
|
|
+ <span>{{ scope.row.materialCode }}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column align="left" label="产品编码" prop="materialOldNumber" min-width="140" show-overflow-tooltip>
|
|
|
<template slot-scope="scope">
|
|
|
<CopyButton :copyText="scope.row.materialOldNumber" />
|
|
|
- <span>{{ scope.row.materialOldNumber }}</span>
|
|
|
+ <span>{{ scope.row.materialOldNumber }}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column align="left" label="产品名称" prop="materialName" min-width="160" show-overflow-tooltip>
|
|
|
<template slot-scope="scope">
|
|
|
<CopyButton :copyText="scope.row.materialName" />
|
|
|
- <span>{{ scope.row.materialName }}</span>
|
|
|
+ <span>{{ scope.row.materialName }}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column align="left" label="规格型号" prop="specification" min-width="350" show-overflow-tooltip>
|
|
|
<template slot-scope="scope">
|
|
|
<CopyButton :copyText="scope.row.specification" />
|
|
|
- <span>{{ scope.row.specification }}</span>
|
|
|
+ <span>{{ scope.row.specification }}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column align="left" label="仓库" prop="correspondName" min-width="100" show-overflow-tooltip>
|
|
@@ -191,22 +194,22 @@
|
|
|
|
|
|
<el-table-column align="right" label="发货金额" prop="payAmount" min-width="100" show-overflow-tooltip>
|
|
|
<template slot-scope="scope">
|
|
|
- {{ scope.row.payAmount | numToFixed }}
|
|
|
+ {{ scope.row.payAmount | numToFixed }}
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column align="right" label="发货返利金额" prop="payRebateAmount" min-width="110" show-overflow-tooltip>
|
|
|
<template slot-scope="scope">
|
|
|
- {{ scope.row.payRebateAmount | numToFixed }}
|
|
|
+ {{ scope.row.payRebateAmount | numToFixed }}
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column align="right" label="发货折扣金额" prop="discAmount" min-width="110" show-overflow-tooltip>
|
|
|
<template slot-scope="scope">
|
|
|
- {{ scope.row.totalDiscAmount | numToFixed }}
|
|
|
+ {{ scope.row.totalDiscAmount | numToFixed }}
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column align="right" label="折扣额合计" prop="totalDiscAmount" min-width="100" show-overflow-tooltip>
|
|
|
<template slot-scope="scope">
|
|
|
- {{ (scope.row.totalDiscAmount + scope.row.payRebateAmount) | numToFixed }}
|
|
|
+ {{ (scope.row.totalDiscAmount + scope.row.payRebateAmount) | numToFixed }}
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column align="right" label="发货数量" prop="refundableQty" min-width="100" show-overflow-tooltip>
|
|
@@ -214,17 +217,17 @@
|
|
|
|
|
|
<el-table-column align="right" label="含税单价" prop="singlePayPrice" min-width="100" show-overflow-tooltip>
|
|
|
<template slot-scope="scope">
|
|
|
- {{ scope.row.singlePayPrice | numToFixed }}
|
|
|
+ {{ scope.row.singlePayPrice | numToFixed }}
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column align="right" label="含税总额" prop="singlePayPrice" min-width="100" show-overflow-tooltip>
|
|
|
<template slot-scope="scope">
|
|
|
- {{ scope.row.payAmount | numToFixed }}
|
|
|
+ {{ scope.row.payAmount | numToFixed }}
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column align="right" label="未出库数量" prop="singlePayPrice" min-width="100" show-overflow-tooltip>
|
|
|
<template slot-scope="scope">
|
|
|
- {{ comRefundableQty(scope.row.type, scope.row.salesExamineStatus, scope.row) }}
|
|
|
+ {{ comRefundableQty(scope.row.type, scope.row.salesExamineStatus, scope.row) }}
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column align="left" label="表头业务员" prop="k3ServiceName" min-width="100" show-overflow-tooltip>
|
|
@@ -277,32 +280,60 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<!-- <pdf ref="myPdfComponent" src="http://zfiresupply.oss-cn-hangzhou.aliyuncs.com/uploadfile/1661914838175.pdf?Expires=1661918438&OSSAccessKeyId=LTAI4GK1q4mnpCFbonMd1pji&Signature=Y0eM%2FuG8Q88rPr0pp%2BDkM5QC%2FDc%3D">
|
|
|
-
|
|
|
</pdf> -->
|
|
|
- <print-preview ref="preView"/>
|
|
|
+ <print-preview ref="preView" />
|
|
|
+ <!-- <PrintTest v-if="isShowPrint" /> -->
|
|
|
+ <!-- <SumPrint :listItem="queryItem" v-if="isShowPrint" @backListFormDetail="backList" />-->
|
|
|
+
|
|
|
+ <el-dialog title="密码确认" :visible.sync="isShowDialog" :show-close="false" width="40%" :close-on-click-modal="false">
|
|
|
+ <el-form ref="dialogForm" :model="dialogForm" :rules="dialogFormRules" label-position="right" label-width="70px">
|
|
|
+ <el-row :gutter="20">
|
|
|
+ <el-col :xs="24" :sm="24" :lg="24">
|
|
|
+ <el-form-item label="密码" prop="password">
|
|
|
+ <el-input v-model="dialogForm.password" autocomplete="off" placeholder="请输入密码"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :xs="24" :sm="12" :lg="12">
|
|
|
+ <el-form-item label="操作人" prop="createMan">
|
|
|
+ <el-input v-model="dialogForm.createMan" readonly></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :xs="24" :sm="12" :lg="12" style="height: 51px;">
|
|
|
+ <el-form-item label="操作日期" prop="createDate">
|
|
|
+ <el-date-picker v-model="dialogForm.createDate" readonly type="date" value-format="yyyy-MM-dd"
|
|
|
+ style="width: 100%;" placeholder="选择日期">
|
|
|
+ </el-date-picker>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ </el-form>
|
|
|
+ <div slot="footer" class="dialog-footer">
|
|
|
+ <el-button @click="cancelDialogForm">取 消</el-button>
|
|
|
+ <el-button type="primary" @click="submitDialogForm">确 定</el-button>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
+
|
|
|
<!-- <PrintTest v-if="isShowPrint" /> -->
|
|
|
-<!-- <SumPrint :listItem="queryItem" v-if="isShowPrint" @backListFormDetail="backList" />-->
|
|
|
+ <!-- <printPreview ref='preView'/> -->
|
|
|
+ <!-- <SumPrint :listItem="queryItem" v-if="isShowPrint" @backListFormDetail="backList" /> -->
|
|
|
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
- import pdf from 'vue-pdf'
|
|
|
import { getSumList } from '@/api/supply/deliver'
|
|
|
+import { checkPassword } from "@/api/supply/pickup";
|
|
|
import { getCategoryList, getSalesmanList } from '@/api/common'
|
|
|
import SumPrint from '@/views/supply/deliver/components/sum_print'
|
|
|
-import {disAutoConnect, hiprint, defaultElementTypeProvider} from 'vue-plugin-hiprint'
|
|
|
+import { disAutoConnect, hiprint, defaultElementTypeProvider } from 'vue-plugin-hiprint'
|
|
|
disAutoConnect();
|
|
|
-
|
|
|
let hiprintTemplate;
|
|
|
import panel from './components/design/panel'
|
|
|
-import { getDetail ,getCompanyLists,
|
|
|
- myData} from './components/design/print-data'
|
|
|
+import { getDetail, getCompanyLists, myData } from './components/design/print-data'
|
|
|
import printPreview from './components/design/preview.vue'
|
|
|
export default {
|
|
|
components: {
|
|
|
SumPrint,
|
|
|
- pdf,
|
|
|
printPreview
|
|
|
},
|
|
|
data() {
|
|
@@ -334,7 +365,7 @@ export default {
|
|
|
queryItem: {},
|
|
|
isShowPrint: false,
|
|
|
curPaper: {
|
|
|
- type: 'A5' ,
|
|
|
+ type: 'A5',
|
|
|
width: 500,
|
|
|
height: 147.6
|
|
|
},
|
|
@@ -366,7 +397,17 @@ export default {
|
|
|
},
|
|
|
scaleValue: 1,
|
|
|
scaleMax: 5,
|
|
|
- scaleMin: 0.5
|
|
|
+ scaleMin: 0.5,
|
|
|
+ isShowDialog: false,
|
|
|
+ dialogForm: {
|
|
|
+ password: "",
|
|
|
+ createMan: "",
|
|
|
+ createDate: "",
|
|
|
+ },
|
|
|
+ dialogFormRules: {
|
|
|
+ password: [{ required: true, message: "请输入密码", trigger: "blur" }],
|
|
|
+ },
|
|
|
+
|
|
|
}
|
|
|
},
|
|
|
|
|
@@ -399,7 +440,6 @@ export default {
|
|
|
} else {
|
|
|
return row.refundableQty
|
|
|
}
|
|
|
-
|
|
|
}
|
|
|
|
|
|
}
|
|
@@ -409,7 +449,7 @@ export default {
|
|
|
let types = this.paperTypes
|
|
|
for (const key in types) {
|
|
|
let item = types[key]
|
|
|
- let {width, height} = this.curPaper
|
|
|
+ let { width, height } = this.curPaper
|
|
|
if (item.width === width && item.height === height) {
|
|
|
type = key
|
|
|
}
|
|
@@ -560,28 +600,78 @@ export default {
|
|
|
this.queryItem = this.tableSelection;
|
|
|
console.log(this.tableSelection);
|
|
|
getDetail(this.tableSelection)
|
|
|
- console.log(333);
|
|
|
// this.isShowPrint = true;
|
|
|
// this.$refs.myPdfComponent.print()
|
|
|
this.$refs.preView.show(hiprintTemplate, myData)
|
|
|
+
|
|
|
+ if (!this.tableSelection[0].printNum) {
|
|
|
+ this.queryItem = this.tableSelection;
|
|
|
+ // this.isShowPrint = true;
|
|
|
+ } else {
|
|
|
+ this.queryItem = this.tableSelection;
|
|
|
+ this.dialogForm.createMan = JSON.parse(
|
|
|
+ localStorage.getItem("supply_user")
|
|
|
+ ).nickName;
|
|
|
+ this.dialogForm.createDate = this.getDate();
|
|
|
+ this.isShowDialog = true;
|
|
|
+ }
|
|
|
+ },
|
|
|
+
|
|
|
+ // 关闭弹窗
|
|
|
+ cancelDialogForm() {
|
|
|
+ this.isShowDialog = false;
|
|
|
+ this.$refs.dialogForm.resetFields();
|
|
|
+ },
|
|
|
+
|
|
|
+ // 提交 弹窗
|
|
|
+ submitDialogForm() {
|
|
|
+ this.$refs.dialogForm.validate((valid) => {
|
|
|
+ if (valid) {
|
|
|
+ let params = {
|
|
|
+ shipId: this.queryItem[0].invoiceId,
|
|
|
+ password: this.dialogForm.password,
|
|
|
+ };
|
|
|
+ checkPassword(params).then((res) => {
|
|
|
+ this.cancelDialogForm();
|
|
|
+ this.isShowPrint = true;
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+
|
|
|
+ getDate() {
|
|
|
+ var date = new Date();
|
|
|
+ var seperator1 = "-";
|
|
|
+ var year = date.getFullYear();
|
|
|
+ var month = date.getMonth() + 1;
|
|
|
+ var strDate = date.getDate();
|
|
|
+ if (month >= 1 && month <= 9) {
|
|
|
+ month = "0" + month;
|
|
|
+ }
|
|
|
+ if (strDate >= 0 && strDate <= 9) {
|
|
|
+ strDate = "0" + strDate;
|
|
|
+ }
|
|
|
+ var currentdate = year + seperator1 + month + seperator1 + strDate;
|
|
|
+ return currentdate;
|
|
|
+
|
|
|
},
|
|
|
|
|
|
backList() {
|
|
|
this.queryItem = {};
|
|
|
this.isShowPrint = false;
|
|
|
},
|
|
|
- /**
|
|
|
- * 设置纸张大小
|
|
|
- * @param type [A3, A4, A5, B3, B4, B5, other]
|
|
|
- * @param value {width,height} mm
|
|
|
- */
|
|
|
- setPaper(type, value) {
|
|
|
+ /**
|
|
|
+ * 设置纸张大小
|
|
|
+ * @param type [A3, A4, A5, B3, B4, B5, other]
|
|
|
+ * @param value {width,height} mm
|
|
|
+ */
|
|
|
+ setPaper(type, value) {
|
|
|
try {
|
|
|
if (Object.keys(this.paperTypes).includes(type)) {
|
|
|
- this.curPaper = {type: type, width: value.width, height: value.height}
|
|
|
+ this.curPaper = { type: type, width: value.width, height: value.height }
|
|
|
hiprintTemplate.setPaper(value.width, value.height)
|
|
|
} else {
|
|
|
- this.curPaper = {type: 'other', width: value.width, height: value.height}
|
|
|
+ this.curPaper = { type: 'other', width: value.width, height: value.height }
|
|
|
hiprintTemplate.setPaper(value.width, value.height)
|
|
|
}
|
|
|
} catch (error) {
|