@@ -9,8 +9,8 @@ var path = require('path'); | |||||
// https://blog.csdn.net/weixin_42171955/article/details/100156212 | // https://blog.csdn.net/weixin_42171955/article/details/100156212 | ||||
var strInputFileName = '../dist/index.html'; | var strInputFileName = '../dist/index.html'; | ||||
var strOutputFileName = 'E:\\code\\lou\\application\\admin\\view\\order_main\\add.html'; | |||||
var strOutputFileName2 = 'E:\\code\\lou\\application\\admin\\view\\order_main\\edit.html'; | |||||
var strOutputFileName = 'E:\\code\\lou\\public\\view\\order_main\\add.html'; | |||||
var strOutputFileName2 = 'E:\\code\\lou\\public\\view\\order_main\\edit.html'; | |||||
var fRead = fs.createReadStream(strInputFileName); | var fRead = fs.createReadStream(strInputFileName); | ||||
var fWrite = fs.createWriteStream(strOutputFileName); | var fWrite = fs.createWriteStream(strOutputFileName); | ||||
@@ -26,8 +26,8 @@ var objReadline = readline.createInterface({ | |||||
terminal: false | terminal: false | ||||
}); | }); | ||||
objReadline.on('line', (strLine) => { | objReadline.on('line', (strLine) => { | ||||
let strTemp = `<script>window.id = ''</script>${strLine}`; | |||||
let strTemp2 = `<input id="c-id" type="hidden" value="{$row.id}"><script>window.id = document.getElementById('c-id').value</script>${strLine}`; | |||||
let strTemp = `<script>window.id = '';function close(){window.parent.postMessage('message', window.location.protocol+"//"+window.location.host);}</script>${strLine}`; | |||||
let strTemp2 = `<script> window.id = getQueryVariable("id");function getQueryVariable(variable){var query = window.location.search.substring(1);var vars = query.split("&");for (var i=0;i<vars.length;i++) { var pair = vars[i].split("=");if(pair[0] == variable){return pair[1];}}return(false);}function close(){window.parent.postMessage('message', window.location.protocol+"//"+window.location.host);}</script>${strLine}`; | |||||
fWrite.write(strTemp); | fWrite.write(strTemp); | ||||
fWrite2.write(strTemp2); | fWrite2.write(strTemp2); | ||||
}); | }); | ||||
@@ -5,10 +5,11 @@ | |||||
<template slot="title"> | <template slot="title"> | ||||
<el-row type="flex" justify="space-between" style="width:100%;padding: 0 30px"> | <el-row type="flex" justify="space-between" style="width:100%;padding: 0 30px"> | ||||
<el-button type="text">基本信息</el-button> | <el-button type="text">基本信息</el-button> | ||||
<div> | |||||
<el-button @click.stop.prevent="editSingle=true" v-show="type=='view'&&!editSingle">修改</el-button> | |||||
<el-button v-show="editSingle" @click.stop.prevent="save">保存</el-button> | |||||
<el-button v-show="editSingle" @click.stop.prevent="cancel">取消</el-button> | |||||
<div v-if="orderMain.receipt_order_status==0"> | |||||
<el-button @click.stop.prevent="editSingle=true" v-show="type=='view'&&!editSingle" type="primary">修改 | |||||
</el-button> | |||||
<el-button v-show="editSingle" @click.stop.prevent="save" type="primary">保存</el-button> | |||||
<el-button v-show="editSingle" @click.stop.prevent="cancel" type="danger">取消</el-button> | |||||
</div> | </div> | ||||
</el-row> | </el-row> | ||||
</template> | </template> | ||||
@@ -66,6 +67,18 @@ | |||||
<el-form-item label="备注"> | <el-form-item label="备注"> | ||||
<el-input type="textarea" v-model="orderMain.order_memo"></el-input> | <el-input type="textarea" v-model="orderMain.order_memo"></el-input> | ||||
</el-form-item> | </el-form-item> | ||||
<template v-if="type!='add'"> | |||||
<el-col :span="12"> | |||||
<el-form-item label="收款单信息" prop="receipt_order_name"> | |||||
<el-input disabled v-model="orderMain.receipt_order_name"></el-input> | |||||
</el-form-item> | |||||
</el-col> | |||||
<el-col :span="12"> | |||||
<el-form-item label="收款单状态" prop="receipt_order_status"> | |||||
<el-input disabled v-model="orderMain.receipt_order_status==0?'未收款':orderMain.receipt_order_status==1?'收款中':'已收款'"></el-input> | |||||
</el-form-item> | |||||
</el-col> | |||||
</template> | |||||
</el-form> | </el-form> | ||||
</el-collapse-item> | </el-collapse-item> | ||||
@@ -77,9 +90,11 @@ | |||||
</el-row> | </el-row> | ||||
</el-form-item> | </el-form-item> | ||||
<template v-for="(item,index) in hotelList"> | <template v-for="(item,index) in hotelList"> | ||||
<el-card class="card" shadow="hover" :key="'hotel'+index"> | |||||
<el-card class="card" shadow="hover" style="margin-top: 20px" :key="'hotel'+index"> | |||||
<el-row type="flex" justify="end" v-if="type=='add'"> | <el-row type="flex" justify="end" v-if="type=='add'"> | ||||
<i class="el-icon-close" @click="delSinHotel(index)"></i> | |||||
<!-- <i class="el-icon-circle-close" @click="delSinHotel(index)"></i>--> | |||||
<el-button @click="delSinHotel(index)" type="danger">删除</el-button> | |||||
</el-row> | </el-row> | ||||
<hotel :ref="'formhotel'+index" :userOpt="userOpt" :supplier_idList="supplier_idList" :dataObj="item" | <hotel :ref="'formhotel'+index" :userOpt="userOpt" :supplier_idList="supplier_idList" :dataObj="item" | ||||
:hotelListOpt="hotelListOpt" | :hotelListOpt="hotelListOpt" | ||||
@@ -93,9 +108,10 @@ | |||||
</el-row> | </el-row> | ||||
</el-form-item> | </el-form-item> | ||||
<template v-for="(item,index) in hotelotherList"> | <template v-for="(item,index) in hotelotherList"> | ||||
<el-card class="card" shadow="hover" :key="'hotelother'+index"> | |||||
<el-card class="card" shadow="hover" style="margin-top: 20px" :key="'hotelother'+index"> | |||||
<el-row type="flex" justify="end" v-if="type=='add'"> | <el-row type="flex" justify="end" v-if="type=='add'"> | ||||
<i class="el-icon-close" @click="delSinHotelOther(index)"></i> | |||||
<!-- <i class="el-icon-circle-close" @click="delSinHotelOther(index)"></i>--> | |||||
<el-button @click="delSinHotel(index)" type="danger">删除</el-button> | |||||
</el-row> | </el-row> | ||||
<hotelother :ref="'formhotelother'+index" :userOpt="userOpt" :supplier_idList="supplier_idList" | <hotelother :ref="'formhotelother'+index" :userOpt="userOpt" :supplier_idList="supplier_idList" | ||||
:dataObj="item" :cf_itemOpt="cf_itemOpt" | :dataObj="item" :cf_itemOpt="cf_itemOpt" | ||||
@@ -103,7 +119,7 @@ | |||||
:type="type"></hotelother> | :type="type"></hotelother> | ||||
</el-card> | </el-card> | ||||
</template> | </template> | ||||
<el-form-item> | |||||
<el-form-item v-if="orderMain.receipt_order_status==0 || type=='add'"> | |||||
<el-button type="primary" @click="onSubmit">提交订单</el-button> | <el-button type="primary" @click="onSubmit">提交订单</el-button> | ||||
</el-form-item> | </el-form-item> | ||||
</el-form> | </el-form> | ||||
@@ -148,9 +164,6 @@ | |||||
user_name: [ | user_name: [ | ||||
{required: true, message: '请输入', trigger: 'blur'}, | {required: true, message: '请输入', trigger: 'blur'}, | ||||
], | ], | ||||
user_phone: [ | |||||
{required: true, message: '请输入', trigger: 'blur'}, | |||||
], | |||||
order_memo: [ | order_memo: [ | ||||
{required: true, message: '请输入', trigger: 'blur'}, | {required: true, message: '请输入', trigger: 'blur'}, | ||||
] | ] | ||||
@@ -277,7 +290,7 @@ | |||||
this.$alert('新增成功', '提示', { | this.$alert('新增成功', '提示', { | ||||
confirmButtonText: '确定', | confirmButtonText: '确定', | ||||
callback: action => { | callback: action => { | ||||
Fast.api.close() | |||||
window.close() | |||||
} | } | ||||
}); | }); | ||||
}).catch((err) => { | }).catch((err) => { | ||||
@@ -306,6 +319,9 @@ | |||||
} | } | ||||
this.$alert(res.data.msg, '提示', { | this.$alert(res.data.msg, '提示', { | ||||
confirmButtonText: '确定', | confirmButtonText: '确定', | ||||
callback: action => { | |||||
window.close() | |||||
} | |||||
}); | }); | ||||
}).catch((err) => { | }).catch((err) => { | ||||
console.log(err) | console.log(err) | ||||
@@ -420,6 +436,9 @@ | |||||
if (res.data.flag) { | if (res.data.flag) { | ||||
let orderMain = this.$lo.cloneDeep(res.data.data) | let orderMain = this.$lo.cloneDeep(res.data.data) | ||||
delete orderMain.subOrderList | delete orderMain.subOrderList | ||||
if (orderMain.receipt_order_status != 0) { | |||||
this.type = 'view' | |||||
} | |||||
this.orderMain = orderMain | this.orderMain = orderMain | ||||
this.orderMainCopy = this.$lo.cloneDeep(orderMain) | this.orderMainCopy = this.$lo.cloneDeep(orderMain) | ||||
res.data.data.subOrderList.forEach((item) => { //回显值的处理 | res.data.data.subOrderList.forEach((item) => { //回显值的处理 | ||||
@@ -450,4 +469,14 @@ | |||||
.card { | .card { | ||||
overflow-x: scroll; | overflow-x: scroll; | ||||
} | } | ||||
.el-icon-minus { | |||||
line-height: 30px; | |||||
height: 30px; | |||||
} | |||||
.el-icon-plus { | |||||
line-height: 30px; | |||||
height: 30px; | |||||
} | |||||
</style> | </style> |
@@ -3,7 +3,7 @@ | |||||
<el-collapse v-model="opened" v-if="type=='view'"> | <el-collapse v-model="opened" v-if="type=='view'"> | ||||
<el-collapse-item name="1"> | <el-collapse-item name="1"> | ||||
<template slot="title"> | <template slot="title"> | ||||
<el-row style="width:100%;margin-top:10px;margin-bottom:10px;padding-right: 20px;" type="flex" | |||||
<el-row style="width:100%;margin-top:10px;margin-bottom:10px;padding-right: 20px;background-color: #9fd8fc" type="flex" | |||||
justify="space-between" align="middle"> | justify="space-between" align="middle"> | ||||
<el-col :span="2"> | <el-col :span="2"> | ||||
{{ '酒店' }} | {{ '酒店' }} | ||||
@@ -11,10 +11,10 @@ | |||||
<!-- <el-col :span="2" :push="3">--> | <!-- <el-col :span="2" :push="3">--> | ||||
<!-- <el-button>增补采购单</el-button>--> | <!-- <el-button>增补采购单</el-button>--> | ||||
<!-- </el-col>--> | <!-- </el-col>--> | ||||
<div> | |||||
<el-button @click.stop.prevent="edit" v-show="dataObjTemp.editType=='view'">修改</el-button> | |||||
<el-button v-show="dataObjTemp.editType=='edit'" @click.stop.prevent="save">保存</el-button> | |||||
<el-button v-show="dataObjTemp.editType=='edit'" @click.stop.prevent="cancel">取消</el-button> | |||||
<div v-if="dataObj.receipt_order_status==0"> | |||||
<el-button @click.stop.prevent="edit" v-show="dataObjTemp.editType=='view'" type="primary">修改</el-button> | |||||
<el-button v-show="dataObjTemp.editType=='edit'" @click.stop.prevent="save" type="primary">保存</el-button> | |||||
<el-button v-show="dataObjTemp.editType=='edit'" @click.stop.prevent="cancel" type="danger">取消</el-button> | |||||
</div> | </div> | ||||
</el-row> | </el-row> | ||||
</template> | </template> | ||||
@@ -90,7 +90,7 @@ | |||||
<el-table | <el-table | ||||
:data="dataObj.purchasePriceList" | :data="dataObj.purchasePriceList" | ||||
border | border | ||||
height="500" | |||||
height="320" | |||||
:span-method="arraySpanMethod" | :span-method="arraySpanMethod" | ||||
:summary-method="getSummaries" | :summary-method="getSummaries" | ||||
show-summary | show-summary | ||||
@@ -175,7 +175,7 @@ | |||||
</el-form-item> | </el-form-item> | ||||
</el-col> | </el-col> | ||||
<el-col :span="12"> | <el-col :span="12"> | ||||
<el-form-item label-width="100px" label="资源负责人"> | |||||
<el-form-item label-width="100px" label="采购负责人"> | |||||
<el-select style="width: 100%" v-model="dataObj.purchase_user_id" disabled placeholder="请选择"> | <el-select style="width: 100%" v-model="dataObj.purchase_user_id" disabled placeholder="请选择"> | ||||
<el-option | <el-option | ||||
v-for="item in userOpt" | v-for="item in userOpt" | ||||
@@ -269,7 +269,7 @@ | |||||
<el-table | <el-table | ||||
:data="dataObj.purchasePriceList" | :data="dataObj.purchasePriceList" | ||||
border | border | ||||
height="500" | |||||
height="320" | |||||
:summary-method="getSummaries" | :summary-method="getSummaries" | ||||
:span-method="arraySpanMethod" | :span-method="arraySpanMethod" | ||||
show-summary | show-summary | ||||
@@ -353,7 +353,7 @@ | |||||
</el-form-item> | </el-form-item> | ||||
</el-col> | </el-col> | ||||
<el-col :span="12"> | <el-col :span="12"> | ||||
<el-form-item label-width="100px" label="资源负责人"> | |||||
<el-form-item label-width="100px" label="采购负责人"> | |||||
<el-select style="width: 100%" v-model="dataObj.purchase_user_id" disabled placeholder="请选择"> | <el-select style="width: 100%" v-model="dataObj.purchase_user_id" disabled placeholder="请选择"> | ||||
<el-option | <el-option | ||||
v-for="item in userOpt" | v-for="item in userOpt" | ||||
@@ -411,9 +411,6 @@ | |||||
customer_name: [ | customer_name: [ | ||||
{required: true, message: '请输入', trigger: 'blur'}, | {required: true, message: '请输入', trigger: 'blur'}, | ||||
], | ], | ||||
trade_order_number: [ | |||||
{required: true, message: '请输入', trigger: 'blur'}, | |||||
], | |||||
confirm_status: [ | confirm_status: [ | ||||
{required: true, message: '请输入', trigger: 'blur'}, | {required: true, message: '请输入', trigger: 'blur'}, | ||||
], | ], | ||||
@@ -635,6 +632,9 @@ | |||||
} | } | ||||
this.$alert(res.data.msg, '提示', { | this.$alert(res.data.msg, '提示', { | ||||
confirmButtonText: '确定', | confirmButtonText: '确定', | ||||
callback: action => { | |||||
window.close() | |||||
} | |||||
}); | }); | ||||
}).catch((err) => { | }).catch((err) => { | ||||
console.log(err) | console.log(err) | ||||
@@ -659,7 +659,7 @@ | |||||
} | } | ||||
if (this.dataObj.hotel_id && this.dataObj.hotel_id && this.dataObj.hotel_id) { | |||||
if (this.dataObj.hotel_id && this.dataObj.room_id && this.dataObj.plan_id) { | |||||
// let hotel_id = this.dataObj.hotel_id | // let hotel_id = this.dataObj.hotel_id | ||||
// let room_id = this.dataObj.room_id | // let room_id = this.dataObj.room_id | ||||
// let plan_id = this.dataObj.plan_id | // let plan_id = this.dataObj.plan_id | ||||
@@ -3,7 +3,7 @@ | |||||
<el-collapse v-model="opened" v-if="type=='view'"> | <el-collapse v-model="opened" v-if="type=='view'"> | ||||
<el-collapse-item name="1"> | <el-collapse-item name="1"> | ||||
<template slot="title"> | <template slot="title"> | ||||
<el-row style="width:100%;margin-top:10px;margin-bottom:10px;padding-right: 20px;" type="flex" | |||||
<el-row style="width:100%;margin-top:10px;margin-bottom:10px;padding-right: 20px;;background-color: #9fd8fc" type="flex" | |||||
justify="space-between" align="middle"> | justify="space-between" align="middle"> | ||||
<el-col :span="2"> | <el-col :span="2"> | ||||
{{'附加项目'}} | {{'附加项目'}} | ||||
@@ -11,10 +11,10 @@ | |||||
<!-- <el-col :span="2" :push="3">--> | <!-- <el-col :span="2" :push="3">--> | ||||
<!-- <el-button>增补采购单</el-button>--> | <!-- <el-button>增补采购单</el-button>--> | ||||
<!-- </el-col>--> | <!-- </el-col>--> | ||||
<div> | |||||
<el-button @click.stop.prevent="edit" v-show="dataObjTemp.editType=='view'">修改</el-button> | |||||
<el-button v-show="dataObjTemp.editType=='edit'" @click.stop.prevent="save">保存</el-button> | |||||
<el-button v-show="dataObjTemp.editType=='edit'" @click.stop.prevent="cancel">取消</el-button> | |||||
<div v-if="dataObj.receipt_order_status==0">> | |||||
<el-button @click.stop.prevent="edit" v-show="dataObjTemp.editType=='view'" type="primary">修改</el-button> | |||||
<el-button v-show="dataObjTemp.editType=='edit'" @click.stop.prevent="save" type="primary">保存</el-button> | |||||
<el-button v-show="dataObjTemp.editType=='edit'" @click.stop.prevent="cancel" type="danger">取消</el-button> | |||||
</div> | </div> | ||||
</el-row> | </el-row> | ||||
</template> | </template> | ||||
@@ -69,7 +69,7 @@ | |||||
<el-table | <el-table | ||||
:data="dataObj.purchasePriceList" | :data="dataObj.purchasePriceList" | ||||
border | border | ||||
height="500" | |||||
height="160" | |||||
:span-method="arraySpanMethod" | :span-method="arraySpanMethod" | ||||
:summary-method="getSummaries" | :summary-method="getSummaries" | ||||
show-summary | show-summary | ||||
@@ -137,8 +137,8 @@ | |||||
</el-form-item> | </el-form-item> | ||||
</el-col> | </el-col> | ||||
<el-col :span="6"> | <el-col :span="6"> | ||||
<el-form-item label-width="120px" label="采购资源负责人" prop="purchase_user_id"> | |||||
<el-select style="width: 100%" v-model="dataObj.purchase_user_id" filterable placeholder="请选择"> | |||||
<el-form-item label-width="120px" label="采购负责人" prop="purchase_user_id"> | |||||
<el-select style="width: 100%" v-model="dataObj.purchase_user_id" disabled filterable placeholder="请选择"> | |||||
<el-option | <el-option | ||||
v-for="item in userOpt" | v-for="item in userOpt" | ||||
:key="'purchase_user_id'+item.id" | :key="'purchase_user_id'+item.id" | ||||
@@ -218,7 +218,7 @@ | |||||
<el-table | <el-table | ||||
:data="dataObj.purchasePriceList" | :data="dataObj.purchasePriceList" | ||||
border | border | ||||
height="500" | |||||
height="160" | |||||
:summary-method="getSummaries" | :summary-method="getSummaries" | ||||
:span-method="arraySpanMethod" | :span-method="arraySpanMethod" | ||||
show-summary | show-summary | ||||
@@ -285,8 +285,8 @@ | |||||
</el-form-item> | </el-form-item> | ||||
</el-col> | </el-col> | ||||
<el-col :span="6"> | <el-col :span="6"> | ||||
<el-form-item label-width="120px" label="采购资源负责人" prop="purchase_user_id"> | |||||
<el-select style="width: 100%" v-model="dataObj.purchase_user_id" filterable placeholder="请选择"> | |||||
<el-form-item label-width="120px" label="采购负责人" prop="purchase_user_id"> | |||||
<el-select style="width: 100%" v-model="dataObj.purchase_user_id" filtera disabledble placeholder="请选择"> | |||||
<el-option | <el-option | ||||
v-for="item in userOpt" | v-for="item in userOpt" | ||||
:key="'purchase_user_id'+item.id" | :key="'purchase_user_id'+item.id" | ||||
@@ -345,12 +345,6 @@ | |||||
customer_name: [ | customer_name: [ | ||||
{required: true, message: '请输入', trigger: 'blur'}, | {required: true, message: '请输入', trigger: 'blur'}, | ||||
], | ], | ||||
confirm_no: [ | |||||
{required: true, message: '请输入', trigger: 'blur'}, | |||||
], | |||||
trade_order_number: [ | |||||
{required: true, message: '请输入', trigger: 'blur'}, | |||||
], | |||||
purchase_user_id: [ | purchase_user_id: [ | ||||
{required: true, message: '请输入', trigger: 'change'}, | {required: true, message: '请输入', trigger: 'change'}, | ||||
], | ], | ||||
@@ -403,7 +397,7 @@ | |||||
let data = this.cf_itemOpt.find((item) => { | let data = this.cf_itemOpt.find((item) => { | ||||
return item.id == id | return item.id == id | ||||
}) | }) | ||||
console.log(data) | |||||
console.log('changeItem', data) | |||||
data.item_name = data.name | data.item_name = data.name | ||||
this.dataObjTemp = Object.assign(this.dataObjTemp, data); | this.dataObjTemp = Object.assign(this.dataObjTemp, data); | ||||
}, | }, | ||||
@@ -522,6 +516,9 @@ | |||||
} | } | ||||
this.$alert(res.data.msg, '提示', { | this.$alert(res.data.msg, '提示', { | ||||
confirmButtonText: '确定', | confirmButtonText: '确定', | ||||
callback: action => { | |||||
window.close() | |||||
} | |||||
}); | }); | ||||
}).catch((err) => { | }).catch((err) => { | ||||
console.log(err) | console.log(err) | ||||
@@ -543,7 +540,9 @@ | |||||
if (process.env.NODE_ENV !== 'production') { | if (process.env.NODE_ENV !== 'production') { | ||||
axios.defaults.baseURL = '/api' //关键代码 | axios.defaults.baseURL = '/api' //关键代码 | ||||
} | } | ||||
if (this.dataObj.item_id) { | |||||
this.changeItem(this.dataObj.item_id) | |||||
} | |||||
} | } | ||||
} | } | ||||
</script> | </script> | ||||