Browse Source

Merge remote-tracking branch 'origin/master'

master
yxt_djz 3 years ago
parent
commit
688a6b1a1d
  1. 4
      anrui-scm/anrui-scm-ui/src/api/examinePage/chukushenhe.js
  2. 331
      anrui-scm/anrui-scm-ui/src/views/examinePage/chukushenhe/chukushenhe.vue
  3. 282
      anrui-scm/anrui-scm-ui/src/views/examinePage/chukushenhe/chukushenheTodo.vue
  4. 4
      anrui-scm/anrui-scm-ui/src/views/examinePage/chukushenhe/relation/userInfoLook.vue

4
anrui-scm/anrui-scm-ui/src/api/examinePage/chukushenhe.js

@ -40,8 +40,8 @@ export function examine(params) {
// 模糊搜索客户
export function customerName() {
return request({
url: "/buscenter/v1/busorder/likeGetCustomerName",
method: "post"
url: '/crm/v1/crmcustomer/cusList',
method: 'post'
// params: { staffSid: id }
});
}

331
anrui-scm/anrui-scm-ui/src/views/examinePage/chukushenhe/chukushenhe.vue

@ -8,76 +8,35 @@
<!--start 查询列表按钮部分开始-->
<div>
<!-- <el-button type="primary" size="small" @click="handleSubmit()">提交</el-button>-->
<el-button type="info" size="small" @click="handleClose()"
>关闭</el-button
>
<el-button type="info" size="small" @click="handleClose()">关闭</el-button>
</div>
<!--end 查询列表按钮部分结束-->
</div>
<!--按钮部分结束-->
<!--Start查询列表部分-->
<div class="searchcon">
<el-button size="small" class="searchbtn" @click="clicksearchShow">{{
searchxianshitit
}}</el-button>
<el-button size="small" class="searchbtn" @click="clicksearchShow">{{searchxianshitit }}
</el-button>
<div v-show="isSearchShow" class="search">
<el-form
ref="listQueryform"
:inline="true"
:model="listQuery"
label-width="100px"
class="tab-header"
>
<el-form ref="listQueryform" :inline="true" :model="listQuery" label-width="100px" class="tab-header">
<el-form-item label="合同编号">
<el-input
v-model="listQuery.params.contractNo"
placeholder="请输入合同编号"
clearable
class="filter-item"
/>
<el-input v-model="listQuery.params.contractNo" placeholder="请输入合同编号" clearable class="filter-item"/>
</el-form-item>
<el-form-item label="客户名称">
<el-select
v-model="listQuery.name"
class="addinputw"
clearable
filterable
placeholder="请选择"
@change="customerChange"
>
<el-option
v-for="item in customerList"
:key="item.sid"
:label="item.customerName"
:value="item.customerName"
/>
<el-select v-model="listQuery.name" class="addinputw" clearable filterable placeholder="请选择" @change="customerChange">
<el-option v-for="item in customerList" :key="item.sid" :label="item.name" :value="item.name"/>
</el-select>
</el-form-item>
<el-form-item label="申请人">
<el-input
v-model="listQuery.params.applyName"
placeholder="请输入申请人姓名"
clearable
class="filter-item"
/>
<el-input v-model="listQuery.params.applyName" placeholder="请输入申请人姓名" clearable class="filter-item"/>
</el-form-item>
<el-form-item label="申请日期">
<div class="block">
<el-date-picker
v-model="listQuery.params.applyDateStart"
type="date"
placeholder="选择日期"
>
</el-date-picker>
<el-date-picker v-model="listQuery.params.applyDateStart" type="date" placeholder="选择日期"></el-date-picker>
</div>
<label></label>
<div class="block">
<el-date-picker
v-model="listQuery.params.applyDateEnd"
type="date"
placeholder="选择日期"
>
</el-date-picker>
<el-date-picker v-model="listQuery.params.applyDateEnd" type="date" placeholder="选择日期"></el-date-picker>
</div>
</el-form-item>
<el-divider></el-divider>
@ -92,45 +51,18 @@
<div class="listtop">
<div class="tit">出库申请列表</div>
<pageye
v-show="total > 0"
:total="total"
:page.sync="listQuery.current"
:limit.sync="listQuery.size"
class="pagination"
@pagination="getList"
/>
<pageye v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current" :limit.sync="listQuery.size" class="pagination" @pagination="getList"/>
</div>
<!--Start 主页面主要部分 -->
<div class="listcon">
<el-table
:key="tableKey"
v-loading="listLoading"
:data="list"
:border="true"
fit
highlight-current-row
style="width: 100%"
@selection-change="handleSelectionChange"
>
<el-table-column type="selection" align="center" width="50" />
<el-table-column
label="序号"
type="index"
width="80"
:index="indexMethod"
align="center"
/>
<el-table-column width="150px" label="操作" align="center">
<el-table :key="tableKey" v-loading="listLoading" :data="list" :border="true" fit highlight-current-row style="width: 100%" @selection-change="handleSelectionChange">
<el-table-column fixed type="selection" align="center" width="50"/>
<el-table-column fixed label="序号" type="index" width="80" :index="indexMethod" align="center"/>
<el-table-column fixed width="150px" label="操作" align="center">
<template slot-scope="scope">
<div class="searchbtns">
<!--:disabled="scope.row.nodeState == ''?false:true"-->
<el-button
size="small"
type="primary"
@click="handleCheck(scope.row)"
>办理</el-button
>
<el-button size="small" type="primary" @click="handleCheck(scope.row)">办理</el-button>
</div>
</template>
</el-table-column>
@ -163,232 +95,207 @@
</div>
<!--End 主页面主要部分-->
<div class="pages">
<div class="tit" />
<div class="tit"/>
<!-- 翻页 -->
<pagination
v-show="total > 0"
:total="total"
:page.sync="listQuery.current"
:limit.sync="listQuery.size"
class="pagination"
@pagination="getList"
/>
<pagination v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current" :limit.sync="listQuery.size" class="pagination" @pagination="getList"/>
</div>
<!--End查询列表部分-->
</div>
<chukushenqing-info
v-show="viewState == 2"
ref="divInfo"
@doback="resetState"
@reloadlist="getList"
/>
<chukushenqing-info v-show="viewState == 2" ref="divInfo" @doback="resetState" @reloadlist="getList"/>
</div>
</template>
<script>
import { mapGetters } from "vuex";
import {
listExaminePage,
submitBySid,
customerName,
} from "@/api/examinePage/chukushenhe";
import { setuser, getuser } from "@/utils/baocun";
import Pagination from "@/components/pagination";
import pageye from "@/components/pagination/pageye";
import chukushenqingInfo from "./chukushenheTodo";
listExaminePage, customerName
} from '@/api/examinePage/chukushenhe'
import { setuser } from '@/utils/baocun'
import Pagination from '@/components/pagination'
import pageye from '@/components/pagination/pageye'
import chukushenqingInfo from './chukushenheTodo'
export default {
name: "chukushenhe",
name: 'chukushenhe',
components: {
Pagination,
pageye,
chukushenqingInfo,
chukushenqingInfo
},
data() {
return {
viewTitle: "",
//
viewTitle: '',
//
isSearchShow: false,
searchxianshitit: "显示查询条件",
searchxianshitit: '显示查询条件',
viewState: 1, // 1 2
// -----------
// -----------
tableKey: 0,
customerList: [],
list: [],
sids: [], // SIDs
sides: "",
sides: '',
state_list: [],
total: 1,
FormLoading: false,
listLoading: false,
departmentSid: window.sessionStorage.getItem("departmentSid"), //sid
departmentName: window.sessionStorage.getItem("departmentName"), //
typeList: [], //
//
departmentSid: window.sessionStorage.getItem('departmentSid'), // sid
departmentName: window.sessionStorage.getItem('departmentName'), //
typeList: [], //
//
listQuery: {
current: 1,
size: 20,
size: 10,
total: 0,
params: {
applyDateEnd: "", //
applyDateStart: "", //
applyName: "", //
staffSid: window.sessionStorage.getItem("staffSid"), // sid
contractNo: "", //
name: "", //
},
applyDateEnd: '', //
applyDateStart: '', //
applyName: '', //
staffSid: window.sessionStorage.getItem('staffSid'), // sid
contractNo: '', //
name: '' //
}
},
initObj: {
detailVo: {
applyDate: "", //
contractNo: "", //
isTerminal: "", //
applyDate: '', //
contractNo: '', //
isTerminal: '', //
listVo: [],
modelName: "", //
name: "", //
modelName: '', //
name: '' //
},
sid: "",
stringList: [],
sid: '',
stringList: []
},
temp: {}, //
templook: {}, //
textMap: {
update: "编辑",
create: "创建",
update: '编辑',
create: '创建'
},
dialogStatus: "",
};
},
computed: {
...mapGetters([
"id",
"roles",
"rolesIds",
"departmentId",
"departmentCode",
]),
dialogStatus: ''
}
},
created() {
//
this.init();
this.init()
},
methods: {
// ========== ==========
init() {
this.getList();
this.getCustomer();
this.getList()
this.getCustomer()
},
//
//
resetTemp() {
this.temp = {};
this.temp = {}
},
//
getCustomer() {
customerName().then((response) => {
if (response.code === "200") {
this.customerList = response.data;
console.log("客户列表", this.customerList);
if (response.code === '200') {
this.customerList = response.data
console.log('客户列表', this.customerList)
}
});
})
},
//
customerChange(value) {
console.log("触发下拉框按钮", value);
let bb = {};
console.log('触发下拉框按钮', value)
let bb = {}
this.typeList.forEach((e) => {
if (e.customerName == value) {
if (e.name == value) {
bb = {
name: e.customerName,
sid: e.sid,
};
name: e.name,
sid: e.sid
}
}
});
this.listQuery.params.name = bb.name;
console.log("客户名称", this.listQuery.params.name);
})
this.listQuery.params.name = bb.name
console.log('客户名称', this.listQuery.params.name)
},
//
indexMethod(index) {
var pagestart = (this.listQuery.current - 1) * this.listQuery.size;
var pageindex = index + 1 + pagestart;
return pageindex;
var pagestart = (this.listQuery.current - 1) * this.listQuery.size
var pageindex = index + 1 + pagestart
return pageindex
},
// ========== ==========
//
resetState() {
this.viewState = 1;
this.viewState = 1
},
//
clicksearchShow() {
this.isSearchShow = !this.isSearchShow;
this.isSearchShow = !this.isSearchShow
if (this.isSearchShow) {
this.searchxianshitit = "隐藏查询条件";
this.searchxianshitit = '隐藏查询条件'
} else {
this.searchxianshitit = "显示查询条件";
this.searchxianshitit = '显示查询条件'
}
},
// sid
handleSelectionChange(row) {
console.log("开票", row);
const aa = [];
const bb = [];
console.log('开票', row)
const aa = []
const bb = []
row.forEach((element) => {
aa.push(element.sid);
setuser(this.sids); //sids
bb.push(element.state);
});
this.sids = aa;
this.sides = this.sids.join(); //sid
this.state_list = bb;
console.log("sids数组", this.sids);
console.log("sides字符串", this.sides);
aa.push(element.sid)
setuser(this.sids) // sids
bb.push(element.state)
})
this.sids = aa
this.sides = this.sids.join() // sid
this.state_list = bb
console.log('sids数组', this.sids)
console.log('sides字符串', this.sides)
},
//
handleFilter() {
this.listQuery.current = 1;
this.getList();
this.listQuery.current = 1
this.getList()
},
//
handleReset() {
this.listQuery.params = {
applicant: "",
contractNo: "",
customerName: "",
endDate: "",
invoiceState: "",
startDate: "",
};
applicant: '',
contractNo: '',
customerName: '',
endDate: '',
invoiceState: '',
startDate: ''
}
},
// ========== ==========
//
getList() {
this.listLoading = true;
this.listLoading = true
listExaminePage(this.listQuery).then((response) => {
//
this.listLoading = false;
console.log(response);
//
this.listLoading = false
console.log(response)
if (
response.code === "200" &&
response.code === '200' &&
response.data &&
response.data.total > 0
) {
this.list = response.data.records;
this.total = response.data.total;
this.list = response.data.records
this.listQuery.total = response.data.total
} else {
this.list = [];
this.total = 0;
this.list = []
this.listQuery.total = 0
}
});
})
},
//
handleCheck(row) {
this.viewState = 2;
this.$refs["divInfo"].showInfo(row.sid, row.state);
this.viewState = 2
this.$refs['divInfo'].showInfo(row.sid, row.state)
},
//
handleClose() {},
},
};
handleClose() {
}
}
}
</script>
<style scoped>
@ -403,10 +310,12 @@ export default {
label {
padding: 0 6px;
}
.searchbtns {
margin: 10px 0;
text-align: center;
}
.btn_style {
background-color: #018ad2;
color: white;

282
anrui-scm/anrui-scm-ui/src/views/examinePage/chukushenhe/chukushenheTodo.vue

@ -5,27 +5,14 @@
<div>出库申请详情</div>
<!-- <div v-else></div> -->
<div>
<el-button
type="primary"
size="small"
:disabled="createBtn"
@click="handleAgree()">同意</el-button>
<el-button
type="primary"
size="small"
:disabled="disabled"
@click="handleDisagree()">不同意</el-button>
<el-button type="info" size="small" @click="handleReturn()">返回</el-button>
<el-button type="primary" size="small" :disabled="disabled" @click="handleReject()">驳回</el-button>
<el-button type="primary" size="small" :disabled="createBtn" @click="handleAgree()">同意</el-button>
<el-button type="primary" size="small" :disabled="disabled" @click="handleDisagree()">不同意</el-button>
<el-button type="info" size="small" @click="handleReturn()">关闭</el-button>
</div>
</div>
<div class="listconadd">
<el-form
ref="dataForm"
:model="temp"
label-position="right"
label-width="100%"
class="formadd"
:rules="rules">
<el-form ref="dataForm" :model="temp" label-position="right" label-width="100%" class="formadd" :rules="rules">
<div class="tit">
出库申请
<div class="times">
@ -38,7 +25,7 @@
</div>
</div>
<el-row class="nothingBorder">
<el-col :span="2" />
<el-col :span="2"/>
<el-col :span="4">
<el-form-item><span slot="label">客户名称</span></el-form-item>
</el-col>
@ -49,7 +36,7 @@
</el-col>
<el-col :span="4">
<el-form-item
><span slot="label">是否为终端客户</span></el-form-item>
><span slot="label">是否为终端客户</span></el-form-item>
</el-col>
<el-col :span="6">
<el-form-item> <!-- -->
@ -57,10 +44,10 @@
<el-radio v-model="temp.isTerminal" disabled :label="1"></el-radio>
</el-form-item>
</el-col>
<el-col :span="2" />
<el-col :span="2"/>
</el-row>
<el-row>
<el-col :span="2" />
<el-col :span="2"/>
<el-col :span="4">
<el-form-item><span slot="label">车型</span></el-form-item>
</el-col>
@ -69,29 +56,16 @@
<span>{{ temp.modelName }}</span>
</el-form-item>
</el-col>
<el-col :span="12" />
<el-col :span="12"/>
</el-row>
<!--Start 预订车辆信息-->
<div class="titcon">
<div class="title">车辆信息</div>
</div>
<!--@selection-change="handleSelectionChange"-->
<el-table
v-loading="listLoading"
:data="detailsList"
border
style="width: 100%"
:index="index"
fit
>
<el-table v-loading="listLoading" :data="detailsList" border style="width: 100%" :index="index" fit>
<!-- <el-table-column type="selection" align="center" width="50"/>-->
<el-table-column
align="center"
label="序号"
type="index"
width="50"
/>
<el-table-column align="center" label="序号" type="index" width="50"/>
<el-table-column label="车架号" align="center">
<template slot-scope="scope">
<span>{{ scope.row.vinNo }}</span>
@ -106,14 +80,14 @@
<template slot-scope="scope">
<!-- && scope.row.exist == '1' scope.row.nodeState == '' ? false:scope.row.nodeState == '发起订单'?false : true -->
<el-button
v-show="temp.isTerminal === 0"
v-show="scope.row.isExist == '1'"
size="medium"
type="primary"
@click="lookUserInfo(scope.row.vinNo)"
class="btntopbluebut"
>查看
>查看
</el-button>
<span v-show="temp.isTerminal == 3"></span>
<span v-show="temp.isTerminal == 0 && scope.row.isExist == '0'"></span>
</template>
</el-table-column>
<el-table-column label="备注" align="center">
@ -140,22 +114,22 @@
</template>
<script>
import { mapGetters } from "vuex";
import { fetchDetailsBySid, examine } from "@/api/examinePage/chukushenhe";
import userInfoLook from "./relation/userInfoLook";
import { fetchDetailsBySid, examine } from '@/api/examinePage/chukushenhe'
import userInfoLook from './relation/userInfoLook'
export default {
name: "chukushenheTodo",
name: 'chukushenheTodo',
components: {
userInfoLook,
userInfoLook
},
data() {
return {
viewTitle: "",
viewTitle: '',
index: 0,
disabled: false, //
createBtn: false,
dialogStatus: "add", //
dialogStatus: 'add', //
// ---------
isShow: true,
isShowLook: false,
@ -163,170 +137,190 @@ export default {
listLoading: false,
list: [],
temp: {
applyName: window.sessionStorage.getItem("name"), //
applySid: window.sessionStorage.getItem("staffSid"), // sid staffSid
contractNo: "", //
applyName: window.sessionStorage.getItem('name'), //
applySid: window.sessionStorage.getItem('staffSid'), // sid staffSid
contractNo: '', //
isTerminal: 3, // 10
modelName: "", //
name: "", //
sid: "",
applyDate: "", //
detailsList: [],
modelName: '', //
name: '', //
sid: '',
applyDate: '', //
detailsList: []
}, //
detailsList: [
{
price: "", //
remarks: "", //
vinNo: "", //
useMessage: {},
},
price: '', //
remarks: '', //
vinNo: '', //
useMessage: {}
}
],
sids: [],
vinNo_info: "",
vinNo_info: '',
submitDto: {
businessSid: "",
userSid: window.sessionStorage.getItem("userSid"),
businessSid: '',
userSid: window.sessionStorage.getItem('userSid')
},
rules: {},
rules: {}
// ------------------------------------
};
},
computed: {
...mapGetters([
"id",
"roles",
"rolesIds",
"departmentId",
"departmentCode",
]),
}
},
created() {
//
this.init();
this.init()
},
methods: {
// ------------ ------------
init() {
this.temp = {
applyName: window.sessionStorage.getItem("name"), //
applySid: window.sessionStorage.getItem("staffSid"), // sid staffSid
contractNo: "", //
applyName: window.sessionStorage.getItem('name'), //
applySid: window.sessionStorage.getItem('staffSid'), // sid staffSid
contractNo: '', //
isTerminal: 3, // 10
modelName: "", //
name: "", //
sid: "",
applyDate: "", //
modelName: '', //
name: '', //
sid: '',
applyDate: '', //
detailsList: [],
isUse: false,
};
isUse: false
}
},
resetState() {
this.isShow = true;
this.isShowLook = false;
this.isShow = true
this.isShowLook = false
},
showInfo(sid, state) {
this.$nextTick(() => {
this.$refs["dataForm"].clearValidate();
});
if (state == "已通过" || state == "未通过") {
this.disabled = true;
this.createBtn = true;
this.$refs['dataForm'].clearValidate()
})
if (state == '已通过' || state == '未通过') {
this.disabled = true
this.createBtn = true
}
fetchDetailsBySid({ sid: sid }).then((response) => {
if (response.success) {
this.temp = response.data;
this.temp.sid = sid;
this.detailsList = response.data.listVo;
this.temp = response.data
this.temp.sid = sid
this.detailsList = response.data.listVo
for (var i = 0; i < this.detailsList.length; i++) {
if (JSON.stringify(this.detailsList[i].useMessage) !== "{}") {
this.detailsList[i].isExist = "1";
if (this.detailsList[i].useMessage.vinNo !== '') {
this.detailsList[i].isExist = '1'
}
if (this.detailsList[i].useMessage.vinNo == '') {
this.detailsList[i].isExist = '0'
}
}
this.temp = JSON.parse(
JSON.stringify(this.temp).replace(/listVo/g, "detailsList")
);
console.log("isTerminal", this.temp.isTerminal);
JSON.stringify(this.temp).replace(/listVo/g, 'detailsList')
)
console.log('isTerminal', this.temp.isTerminal)
}
});
})
},
//
lookUserInfo(vinNo) {
console.log("1111", vinNo);
console.log('1111', vinNo)
for (var i = 0; i < this.detailsList.length; i++) {
if (this.detailsList[i].vinNo == vinNo) {
let useMessage = {};
useMessage = this.detailsList[i].useMessage;
this.isShow = false;
this.isShowLook = true;
this.$refs["divUserInfo"].showInfo(useMessage, vinNo);
let useMessage = {}
useMessage = this.detailsList[i].useMessage
this.isShow = false
this.isShowLook = true
this.$refs['divUserInfo'].showInfo(useMessage, vinNo)
}
}
},
handleSelectionChange(row) {
console.log("开票", row);
const aa = [];
const bb = [];
console.log('开票', row)
const aa = []
const bb = []
row.forEach((element) => {
aa.push(element.vinNo);
bb.push(element.sid);
});
this.vinNo_info = aa.join();
this.sids = bb;
aa.push(element.vinNo)
bb.push(element.sid)
})
this.vinNo_info = aa.join()
this.sids = bb
},
handleReject() {
this.$prompt('请输入驳回原因', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消'
}).then(({ value }) => {
if (value) {
const info = {
sid: this.temp.sid,
reason: value,
state: 5
}
examine(info).then((response) => {
if (response.success) {
this.handleReturn('true')
}
})
} else {
this.$message({
showClose: true,
message: '请填写驳回原因!',
type: 'error'
})
return
}
})
},
// ------------ ------------
handleAgree() {
this.$confirm("是否确认同意此审核", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
this.$confirm('是否确认同意此审核', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
const info = {
sid: this.temp.sid,
state: 3,
};
state: 3
}
examine(info).then((response) => {
if (response.success) {
this.handleReturn("true");
this.handleReturn('true')
}
});
});
})
})
},
handleDisagree() {
this.$prompt("请输入不通过原因", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
this.$prompt('请输入不通过原因', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消'
}).then(({ value }) => {
if (value) {
const info = {
sid: this.temp.sid,
reason: value,
state: 4,
};
state: 4
}
examine(info).then((response) => {
if (response.success) {
this.handleReturn("true");
this.handleReturn('true')
}
});
})
} else {
this.$message({
showClose: true,
message: "请填写不通过原因!",
type: "error",
});
return;
message: '请填写不通过原因!',
type: 'error'
})
return
}
});
})
},
//
handleReturn(isreload) {
if (isreload === "true") this.$emit("reloadlist");
this.$refs["dataForm"].resetFields();
this.$emit("doback");
},
},
};
if (isreload === 'true') this.$emit('reloadlist')
this.$refs['dataForm'].resetFields()
this.$emit('doback')
}
}
}
</script>
<style scoped>
.tit {
@ -369,6 +363,7 @@ export default {
.formadd {
padding: 20px 0;
}
.formadd .tit {
font-size: 32px;
border-bottom: 1px solid #e0e3eb;
@ -376,7 +371,8 @@ export default {
margin: 0 0 20px 0;
padding: 20px 0;
}
.formadd .el-row .el-col{
.formadd .el-row .el-col {
padding: 0 !important;
}
</style>

4
anrui-scm/anrui-scm-ui/src/views/examinePage/chukushenhe/relation/userInfoLook.vue

@ -5,8 +5,8 @@
<div>录入使用人信息</div>
<!-- <div v-else></div> -->
<div>
<el-button type="primary" size="small" :disabled="createBtn" @click="handleCreate()">保存</el-button>
<el-button type="info" size="small" @click="handleReturn()">返回</el-button>
<!-- <el-button type="primary" size="small" :disabled="createBtn" @click="handleCreate()">保存</el-button>-->
<el-button type="info" size="small" @click="handleReturn()">关闭</el-button>
</div>
</div>
<div class="listconadd">

Loading…
Cancel
Save