123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148 |
- //转移
- <template>
- <div class="addqueueFCancel">
- <div class="top">
- <dil-form :formId="247" v-model="form" @change="onChange"></dil-form>
- </div>
- <div class="tab">
- <dilTable
- v-bind.sync="option"
- @radio-change="currentRadioChange"
- ></dilTable>
- </div>
- <div class="reason">
- <dil-form :formId="248" v-model="form1" @change="onChange1"></dil-form>
- </div>
- <div class="input_textarea">
- <span>转移原因:</span>
- <el-input
- type="textarea"
- :rows="2"
- placeholder="请输入内容"
- v-model="resultTransferReason">
- </el-input>
- </div>
- <div class="btn">
- <el-button @click="cancel">取消</el-button>
- <el-button type="primary" @click="onclick">确认</el-button>
- </div>
- </div>
- </template>
- <script>
- export default {
- data() {
- return {
- form: {},
- form1: {},
- option: {
- // 表格请求数据的地址
- requestUrl: "/api/v1/qms/getAllQueueMes?apiId=184",
- // 控制显示当选列
- selectionType: "radio",
- },
- // 转移后的门岗id
- gatepostId: 0,
- // 排队实绩id
- resultId:0,
- //转移原因
- resultTransferReason:''
- };
- },
- methods: {
- cancel(){
- this.$router.push({
- path: "/queueFTransfer",
- });
- },
- onChange(val) {
- this.option.requestUrl =
- "/api/v1/qms/getAllQueueMes?apiId=184&gatepostId=" + val.gatepostId+"&i="+new Date();
- },
- onChange1(val) {
- this.gatepostId = val.gatepostId;
- },
- currentRadioChange(row) {
- this.resultId = row.resultId
- },
- onclick() {
- var mapValue = {
- resultId:this.resultId,
- gatepostId:this.gatepostId,
- resultTransferReason: this.resultTransferReason,
- };
- console.log(mapValue)
- if(mapValue.resultId !== 0 && mapValue.gatepostId !== 0 && mapValue.resultTransferReason !== ""){
- this.axios.post("/api/v1/qms/changeQueue",mapValue).then((res)=>{
- if(res.data.code == "200"){
- this.cancel();
- this.$message({
- message: '转移成功!',
- type: 'success'
- });
- }
- })
- }else{
- if(mapValue.resultId == 0){
- this.$message({
- message: '请选择需要转移的车辆!',
- type: 'warning'
- });
- }else{
- if(mapValue.gatepostId == 0){
- this.$message({
- message: '请选择需要转移到的门岗!',
- type: 'warning'
- });
- }else{
- if(mapValue.resultTransferReason == ""){
- this.$message({
- message: '请填写转移的原因!',
- type: 'warning'
- });
- }
- }
- }
- }
- },
- },
- };
- </script>
- <style lang="scss" scoped>
- .addqueueFCancel {
- .top {
- width: 100%;
- height: 80px;
- padding-left: 50px;
- padding-top: 20px;
- }
- .tab {
- width: 100%;
- max-height: 300px;
- }
- .reason {
- width: 100%;
- display: flex;
- align-items: center;
- justify-content: center;
- margin-top: 30px;
- .el-form{
- width: 400px;
- }
- }
- .input_textarea{
- display: flex;
- align-items: center;
- justify-content: center;
- .el-textarea{
- width: 320px;
- }
- }
- .btn {
- width: 100%;
- height: 80px;
- display: flex;
- align-items: center;
- justify-content: center;
- }
- }
- </style>
|