|
@@ -38,7 +38,7 @@
|
|
|
<el-dropdown-menu slot="dropdown">
|
|
|
<el-dropdown-item @click.native="examineBtn('审批')" :disabled="isExamineBtn && !detailData.check">审批
|
|
|
</el-dropdown-item>
|
|
|
- <el-dropdown-item @click.native="checkScheduleDialog = true, checkId = form.id">请核进度
|
|
|
+ <el-dropdown-item @click.native="checkScheduleDialog = true, checkId = form.id">审核进度
|
|
|
</el-dropdown-item>
|
|
|
|
|
|
</el-dropdown-menu>
|
|
@@ -80,6 +80,15 @@
|
|
|
@click="rowAdd(row)">添加轮胎</el-button>
|
|
|
<el-button type="primary" icon="el-icon-printer" size="small"
|
|
|
@click="handlePrint">打印</el-button>
|
|
|
+ <el-button type="success" size="small" :disabled="isrowAdd" icon="el-icon-bottom" @click="excelBox = true">导入
|
|
|
+ </el-button>
|
|
|
+ </template>
|
|
|
+ <template slot="goodsId" slot-scope="{ row }">
|
|
|
+ <el-select v-if="row.$cellEdit" v-model="row.goodsId" allow-create filterable default-first-option >
|
|
|
+ <el-option v-for="(item, index) in goodsIdoptions" :key="index" :label="item.cname"
|
|
|
+ :value="item.id"></el-option>
|
|
|
+ </el-select>
|
|
|
+ <span v-else>{{ row.goodsName }}</span>
|
|
|
</template>
|
|
|
<!-- <template slot-scope="{scope,row}" slot="goodsNum">
|
|
|
<el-input size="small" v-model="formContacts.goodsNum" style="width: 100%">
|
|
@@ -153,13 +162,29 @@
|
|
|
:close-on-click-modal="false" :destroy-on-close="true" :close-on-press-escape="false" v-dialog-drag>
|
|
|
<check-schedule :checkId="checkId" :batchNo="batchNo" @choceScheduleFun="choceScheduleFun"></check-schedule>
|
|
|
</el-dialog>
|
|
|
+ <el-dialog title="导入明细" append-to-body :visible.sync="excelBox" v-if="excelBox" width="555px"
|
|
|
+ :close-on-click-modal="false" v-dialog-drag>
|
|
|
+ <avue-form :option="excelOption" v-model="excelForm" table-loading="excelLoading" :upload-before="uploadBefore"
|
|
|
+ :upload-after="uploadAfter">
|
|
|
+ <template slot="excelTemplate">
|
|
|
+ <el-button type="primary" @click="derivation">
|
|
|
+ 点击下载<i class="el-icon-download el-icon--right"></i>
|
|
|
+ </el-button>
|
|
|
+ </template>
|
|
|
+ </avue-form>
|
|
|
+ <p style="text-align: center;color: #DC0505">
|
|
|
+ 温馨提示 第一次导入时请先下载模板
|
|
|
+ </p>
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
import { getDetails as getCustom } from "@/api/tirePartsMall/basicData/customerInformation"
|
|
|
-import { getDetails, submit, generateShipTask, tradingBox, delOrderItem, checkOrder, confirmRefund, goodsListXs, inboundTask, checkOrderCG, revokeCheckOrderCG, revokeInboundTask } from "@/api/tirePartsMall/salesManagement/saleOrder";
|
|
|
+import { dateFormat } from "@/util/date";
|
|
|
+import { getToken } from "@/util/auth";
|
|
|
+import { getDetails, submit, generateShipTask, tradingBox, delOrderItem, checkOrder, confirmRefund, goodsListXs, inboundTask, checkOrderCG, revokeCheckOrderCG, revokeInboundTask,goodsListAll} from "@/api/tirePartsMall/salesManagement/saleOrder";
|
|
|
import { dotList, goodsDetail } from "@/api/tirePartsMall/purchasingManagement/warehouseEntryOrder";
|
|
|
import reportDialog from "@/components/report-dialog/main";
|
|
|
import checkSchedule from "@/components/check/checkSchedule";
|
|
@@ -176,6 +201,7 @@ export default {
|
|
|
return {
|
|
|
inventory: 0,
|
|
|
isStatus: 1,
|
|
|
+ excelBox:false,
|
|
|
goodsIdoptions: [],
|
|
|
dataList: [],
|
|
|
dicUrlWithCustomId: '',
|
|
@@ -208,6 +234,32 @@ export default {
|
|
|
activeName: "sale_detail",
|
|
|
disabled: false,
|
|
|
key: 0,
|
|
|
+ excelOption: {
|
|
|
+ submitBtn: false,
|
|
|
+ emptyBtn: false,
|
|
|
+ column: [
|
|
|
+ {
|
|
|
+ label: "模板下载",
|
|
|
+ prop: "excelTemplate",
|
|
|
+ formslot: true,
|
|
|
+ span: 24
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "导入明细",
|
|
|
+ prop: "excelFile",
|
|
|
+ type: "upload",
|
|
|
+ drag: true,
|
|
|
+ loadText: "上传中,请稍等",
|
|
|
+ accept: '.xls,.xlsx',
|
|
|
+ span: 24,
|
|
|
+ propsHttp: {
|
|
|
+ res: "data"
|
|
|
+ },
|
|
|
+ tip: "请上传 .xls,.xlsx 标准格式文件",
|
|
|
+ action: "/api/blade-sales-part/ship/import-item"
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ },
|
|
|
form: {
|
|
|
orderItemsList: [],
|
|
|
paymentRecordsList: [],
|
|
@@ -289,11 +341,7 @@ export default {
|
|
|
// message: " ",
|
|
|
// trigger: "blur"
|
|
|
// }]
|
|
|
- }, {
|
|
|
- label: '单据编号',
|
|
|
- prop: "ordNo",
|
|
|
- disabled: true
|
|
|
- },
|
|
|
+ },
|
|
|
// {
|
|
|
// label: '来源单号',
|
|
|
// prop: "srcOrdNo",
|
|
@@ -304,17 +352,23 @@ export default {
|
|
|
// disabled: true
|
|
|
// },
|
|
|
{
|
|
|
- label: '应收类别',
|
|
|
- prop: "receivableType",
|
|
|
- type: "select",
|
|
|
+ label: '业务日期',
|
|
|
+ prop: "businesDate",
|
|
|
+ searchProp:"businesDateList",
|
|
|
disabled: false,
|
|
|
- dicUrl: "/api/blade-system/dict-biz/dictionary?code=receivableType",
|
|
|
- props: {
|
|
|
- label: "dictValue",
|
|
|
- value: "dictValue"
|
|
|
- },
|
|
|
- value: '网络支付'
|
|
|
- }, {
|
|
|
+ type: "datetime",
|
|
|
+ value: dateFormat(new Date(), 'yyyy-MM-dd'),
|
|
|
+ format: "yyyy-MM-dd",
|
|
|
+ valueFormat: "yyyy-MM-dd",
|
|
|
+ rules: [
|
|
|
+ {
|
|
|
+ required: true,
|
|
|
+ message: "",
|
|
|
+ trigger: "blur"
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ {
|
|
|
label: '联系人',
|
|
|
type: "select",
|
|
|
prop: "contacts",
|
|
@@ -378,15 +432,34 @@ export default {
|
|
|
// disabled: true
|
|
|
// },
|
|
|
{
|
|
|
+ label: '应收类别',
|
|
|
+ prop: "receivableType",
|
|
|
+ type: "select",
|
|
|
+ disabled: false,
|
|
|
+ dicUrl: "/api/blade-system/dict-biz/dictionary?code=receivableType",
|
|
|
+ props: {
|
|
|
+ label: "dictValue",
|
|
|
+ value: "dictValue"
|
|
|
+ },
|
|
|
+ value: '网络支付'
|
|
|
+ },
|
|
|
+ {
|
|
|
label: '总金额',
|
|
|
prop: "totalMoney",
|
|
|
disabled: true
|
|
|
},
|
|
|
+
|
|
|
{
|
|
|
label: '结算金额',
|
|
|
prop: "paymentAmountTl",
|
|
|
disabled: true
|
|
|
},
|
|
|
+
|
|
|
+ {
|
|
|
+ label: '单据编号',
|
|
|
+ prop: "ordNo",
|
|
|
+ disabled: true
|
|
|
+ },
|
|
|
{
|
|
|
label: '备注',
|
|
|
prop: "remarks",
|
|
@@ -702,7 +775,12 @@ export default {
|
|
|
detailData: Object
|
|
|
},
|
|
|
async created() {
|
|
|
- this.findObject(this.optionContactsBack.column, "goodsId").click = ({ value, column }) => {}
|
|
|
+ this.findObject(this.optionContactsBack.column, "goodsId").click = ({ value, column }) => {
|
|
|
+ console.log('点击了');
|
|
|
+ this.findObject(this.optionContactsBack.column, "goodsId").dicUrl= "/api/blade-sales-part/goodsDesc/goodsListAll?cname={{key}}&enableOrNot=1"
|
|
|
+ this.$refs.formContacts.dicInit()
|
|
|
+
|
|
|
+ }
|
|
|
// console.log(this.$route);
|
|
|
// if(this.$route.query.check.actId){
|
|
|
|
|
@@ -757,7 +835,6 @@ export default {
|
|
|
this.optionContacts = await this.getColumnData(this.getColumnName(269.1), this.optionContactsBack);
|
|
|
|
|
|
this.findObject(this.optionContacts.column, "goodsId").change = ({ value, column }) => {
|
|
|
-
|
|
|
if (this.formContacts.goodsId !== value) {
|
|
|
goodsDetail({ id: value, customId: this.dicUrlWithCustomId, stock: this.form.storageId ? this.form.storageId : '' }).then(res => {
|
|
|
this.goods = res.data.data
|
|
@@ -918,6 +995,9 @@ export default {
|
|
|
editBtn(row, index) {
|
|
|
console.log(123);
|
|
|
this.confirmEditing()
|
|
|
+ console.log(row);
|
|
|
+ // this.findObject(this.optionContactsBack.column, "goodsId").dicUrl= "/api/blade-sales-part/goodsDesc/goodsListAll?cname={{key}}&enableOrNot=1"
|
|
|
+ this.$refs.formContacts.dicInit()
|
|
|
this.$refs.formContacts.rowEdit(row, index);
|
|
|
dotList({
|
|
|
storageId: this.form.storageId,
|
|
@@ -925,9 +1005,14 @@ export default {
|
|
|
}).then(res => {
|
|
|
this.findObject(this.optionContactsBack.column, "dot").dicData = res.data.data
|
|
|
})
|
|
|
- goodsListXs(this.dicUrlWithCustomId, this.form.storageId ? this.form.storageId : '').then(res => {
|
|
|
- this.findObject(this.optionContactsBack.column, "goodsId").dicData = res.data.data
|
|
|
- })
|
|
|
+ // this.findObject(this.optionContactsBack.column, "goodsId").click = ({ value, column }) => {
|
|
|
+ // console.log('点击了');
|
|
|
+ // this.findObject(this.optionContactsBack.column, "goodsId").dicUrl= "/api/blade-sales-part/goodsDesc/goodsListAll?cname={{key}}&enableOrNot=1"
|
|
|
+ // this.$refs.formContacts.dicInit()
|
|
|
+ // }
|
|
|
+ // goodsListXs(this.dicUrlWithCustomId, this.form.storageId ? this.form.storageId : '').then(res => {
|
|
|
+ // this.findObject(this.optionContactsBack.column, "goodsId").dicData = res.data.data
|
|
|
+ // })
|
|
|
},
|
|
|
//表头编辑
|
|
|
confirmEditing() {
|
|
@@ -1140,7 +1225,7 @@ export default {
|
|
|
this.isDisabledTask = true
|
|
|
}
|
|
|
})
|
|
|
- if(this.form.checkStatus == '审核完成'){
|
|
|
+ if (this.form.checkStatus == '审核完成') {
|
|
|
console.log('审核完成');
|
|
|
this.$set(this.optionForm, 'disabled', true)
|
|
|
this.$set(this.optionContactsBack, 'disabled', true)
|
|
@@ -1352,6 +1437,9 @@ export default {
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
+ inBtn(){
|
|
|
+
|
|
|
+ },
|
|
|
//关闭弹窗表单
|
|
|
beforeClose(done, type) {
|
|
|
console.log(type);
|
|
@@ -1370,16 +1458,20 @@ export default {
|
|
|
spinner: 'el-icon-loading',
|
|
|
background: 'rgba(255,255,255,0.7)'
|
|
|
})
|
|
|
+ goodsListAll().then(res=>{
|
|
|
+ console.log();
|
|
|
+ })
|
|
|
getDetails({ id: id }).then(res => {
|
|
|
this.form = res.data.data
|
|
|
let ordForm = { srcBillNo: this.form.ordNo }
|
|
|
let _this = this
|
|
|
this.dataList = res.data.data.paymentRecordsList ? res.data.data.paymentRecordsList : [];
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.$refs.formContacts.doLayout()
|
|
|
+ })
|
|
|
// getList(1, 50, ordForm).then((res) => {
|
|
|
// this.dataList = res.data.data.records ? res.data.data.records : [];
|
|
|
- // this.$nextTick(() => {
|
|
|
- // this.$refs.formContacts.doLayout()
|
|
|
- // })
|
|
|
+
|
|
|
// })
|
|
|
if (this.form.status !== '录入' && this.form.status !== '退款中' && this.form.status !== '已取消' && this.form.status !== '退款请核' && this.form.status !== '已退款' && this.form.status !== '待确认' && this.form.status !== '待发货') {
|
|
|
console.log(1);
|
|
@@ -1620,6 +1712,24 @@ export default {
|
|
|
console.log('新增了', row);
|
|
|
this.$refs.formContacts.rowAdd()
|
|
|
},
|
|
|
+ uploadAfter(res, done, loading, column) {
|
|
|
+ if (res instanceof Array) {
|
|
|
+ this.form.orderItemsList = this.form.orderItemsList.concat(res)
|
|
|
+ }
|
|
|
+ this.excelBox = false;
|
|
|
+ loading = false;
|
|
|
+ done(res);
|
|
|
+ },
|
|
|
+ derivation() {
|
|
|
+ window.open(
|
|
|
+ `/api/blade-sales-part/ship/export-item?${this.website.tokenHeader
|
|
|
+ }=${getToken()}`
|
|
|
+ );
|
|
|
+ },
|
|
|
+ uploadBefore(file, done, loading) {
|
|
|
+ done();
|
|
|
+ loading = true;
|
|
|
+ },
|
|
|
//打印
|
|
|
handlePrint() {
|
|
|
this.switchDialog = !this.switchDialog;
|