维修业务库init
This commit is contained in:
parent
cea123e213
commit
0f8ceb083f
@ -67,3 +67,11 @@ export function exportCustomerMainExcel(params) {
|
|||||||
responseType: 'blob'
|
responseType: 'blob'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 用户列表
|
||||||
|
export function getCustomerList(){
|
||||||
|
return request({
|
||||||
|
url: "/base/custom/list",
|
||||||
|
method: "get"
|
||||||
|
})
|
||||||
|
}
|
||||||
|
1
src/api/repair/stockOperate/stockOperate.js
Normal file
1
src/api/repair/stockOperate/stockOperate.js
Normal file
@ -0,0 +1 @@
|
|||||||
|
import request from '@/utils/request'
|
1
src/api/repair/stockOperate/stockOperateItem.js
Normal file
1
src/api/repair/stockOperate/stockOperateItem.js
Normal file
@ -0,0 +1 @@
|
|||||||
|
import request from '@/utils/request'
|
1
src/api/repair/stockTransfer/stockTransfer.js
Normal file
1
src/api/repair/stockTransfer/stockTransfer.js
Normal file
@ -0,0 +1 @@
|
|||||||
|
import request from '@/utils/request'
|
1
src/api/repair/stockTransfer/stockTransferItem.js
Normal file
1
src/api/repair/stockTransfer/stockTransferItem.js
Normal file
@ -0,0 +1 @@
|
|||||||
|
import request from '@/utils/request'
|
@ -51,3 +51,11 @@ export function exportBaseSupplierExcel(params) {
|
|||||||
responseType: 'blob'
|
responseType: 'blob'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 获得所有供应商
|
||||||
|
export function getBaseSupplierList(){
|
||||||
|
return request({
|
||||||
|
url: '/supplier/baseSupplier/list',
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
1
src/api/repair/tickets/Tickets.js
Normal file
1
src/api/repair/tickets/Tickets.js
Normal file
@ -0,0 +1 @@
|
|||||||
|
import request from '@/utils/request'
|
1
src/api/repair/tickets/TicketsItem.js
Normal file
1
src/api/repair/tickets/TicketsItem.js
Normal file
@ -0,0 +1 @@
|
|||||||
|
import request from '@/utils/request'
|
@ -1,10 +1,13 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-select v-model="corpSelected" clearable filterable>
|
<el-select v-model="corpSelected" clearable filterable>
|
||||||
<el-option v-for="staff in corpList" :key="staff.id" :label="staff.name" :value="staff.id"/>
|
<el-option v-for="staff in corpList" :key="staff.id" :label="staff.corpName" :value="staff.id"/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
|
import {getCompanyList} from "@/api/base/company";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "",
|
name: "",
|
||||||
data() {
|
data() {
|
||||||
@ -13,7 +16,21 @@ export default {
|
|||||||
corpList: null
|
corpList: null
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {}
|
watch:{
|
||||||
|
corpSelected(val) {
|
||||||
|
const company = this.corpList.find(item => item.id === val);
|
||||||
|
this.$emit("selected", company);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.listCompany()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
async listCompany(){
|
||||||
|
const res = await getCompanyList();
|
||||||
|
this.corpList = res.data
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
@ -1,6 +1,21 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-select v-model="partSelected" clearable filterable style="width: 45rem">
|
<el-select v-model="partSelected" ref="selectTable" clearable style="width: 45rem">
|
||||||
<el-option v-for="part in partList" :key="part.id" :label="part.name" :value="part.id"/>
|
<el-option style="display: none" v-for="part in partList" :key="part.id" :label="part.name" :value="part.id"/>
|
||||||
|
<el-table :data="partList" style="width: 100%" @row-click="handleSelectionChange">
|
||||||
|
<el-table-column label="序号" align="center">
|
||||||
|
<template scope="scope">
|
||||||
|
<span>{{ scope.$index + 1 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="商品名称" prop="name" />
|
||||||
|
<el-table-column label="规格" prop="name" />
|
||||||
|
<el-table-column label="商品编码" prop="name" />
|
||||||
|
<el-table-column label="可用库存" prop="name" />
|
||||||
|
<el-table-column label="成本" prop="name" />
|
||||||
|
<el-table-column label="仓库" prop="name" />
|
||||||
|
</el-table>
|
||||||
|
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNo" :limit.sync="queryParams.pageSize"
|
||||||
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -9,8 +24,16 @@ export default {
|
|||||||
name: "PartChoose",
|
name: "PartChoose",
|
||||||
data(){
|
data(){
|
||||||
return{
|
return{
|
||||||
partSelected: undefined,
|
partSelected: null,
|
||||||
partList: null,
|
partList: [
|
||||||
|
{id: 1, name: '张胜男', age:20, gender: 1},
|
||||||
|
{id: 2, name: '张胜妇', age:20, gender: 1}
|
||||||
|
],
|
||||||
|
queryParams:{
|
||||||
|
pageNo: 1,
|
||||||
|
pageSize: 10
|
||||||
|
},
|
||||||
|
total: 2
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
@ -20,11 +43,18 @@ export default {
|
|||||||
// TODO 获取商品信息
|
// TODO 获取商品信息
|
||||||
async listPart(){
|
async listPart(){
|
||||||
|
|
||||||
|
},
|
||||||
|
handleSelectionChange(data){
|
||||||
|
this.$emit("selected", data)
|
||||||
|
this.$refs.selectTable.blur()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
|
.pagination-container{
|
||||||
|
margin: 0 auto !important;
|
||||||
|
padding: 0 !important;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
41
src/views/repair/Components/RepairTypeChoose.vue
Normal file
41
src/views/repair/Components/RepairTypeChoose.vue
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<el-select v-model="repairSelected">
|
||||||
|
<el-option v-for="repair in repairList" :key="repair.id" :label="repair.name" :value="repair.id" />
|
||||||
|
</el-select>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
|
||||||
|
import {getBaseTypeList} from "@/api/base/type";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "RepairTypeChoose",
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
repairList: [],
|
||||||
|
repairSelected: undefined,
|
||||||
|
}
|
||||||
|
},
|
||||||
|
watch:{
|
||||||
|
repairSelected(val){
|
||||||
|
const repair = this.repairList.find(item => item.id === val)
|
||||||
|
this.$emit('selected', repair)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.listRepair()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
async listRepair(){
|
||||||
|
const res = await getBaseTypeList({type: "03"})
|
||||||
|
this.repairList = res.data
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
|
||||||
|
</style>
|
@ -1,20 +1,37 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-select v-model="supplierSelected">
|
<el-select v-model="supplierSelected" clearable filterable>
|
||||||
<el-option v-for="supplier in supplierList" :key="supplier.id" :label="supplier.name"
|
<el-option v-for="supplier in supplierList" :key="supplier.id" :label="supplier.name"
|
||||||
:value="supplier.id"/>
|
:value="supplier.id"/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
|
import {getBaseSupplierList} from "@/api/repair/supplier";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "",
|
name: "SupplierChoose",
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
supplierSelected: undefined,
|
supplierSelected: undefined,
|
||||||
supplierList: null
|
supplierList: null
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {}
|
watch:{
|
||||||
|
supplierSelected(val) {
|
||||||
|
const supplier = this.supplierList.find(item => item.id === val);
|
||||||
|
this.$emit("selected", supplier);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.listSupplier()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
async listSupplier() {
|
||||||
|
const res = await getBaseSupplierList();
|
||||||
|
this.supplierList = res.data
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
@ -1,19 +1,36 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-select v-model="selected" clearable filterable >
|
<el-select v-model="userSelected" clearable filterable >
|
||||||
<el-option v-for="user in userList" :key="user.id" :label="user.name" :value="user.id" />
|
<el-option v-for="user in userList" :key="user.id" :label="user.cusName" :value="user.id" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
|
import {getCustomerList} from "@/api/base/customer";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "UserChoose",
|
name: "UserChoose",
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
userList: [],
|
userList: [],
|
||||||
selected: undefined,
|
userSelected: undefined,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {}
|
watch:{
|
||||||
|
userSelected(val){
|
||||||
|
const user = this.userList.find(item => item.id === val)
|
||||||
|
this.$emit("selected", user)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.listCustomer()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
async listCustomer(){
|
||||||
|
const res = await getCustomerList()
|
||||||
|
this.userList = res.data
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
64
src/views/repair/Components/WarehouseChoose.vue
Normal file
64
src/views/repair/Components/WarehouseChoose.vue
Normal file
@ -0,0 +1,64 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<el-select class="main-select-tree" clearable ref="selectTree" v-model="warehouseSelected">
|
||||||
|
<el-option v-for="warehouse in optionData(warehouseList)"
|
||||||
|
:key="warehouse.value"
|
||||||
|
:label="warehouse.label"
|
||||||
|
:value="warehouse.value" style="display: none"/>
|
||||||
|
<el-tree class="main-select-el-tree" ref="selectedTree"
|
||||||
|
:data="warehouseList"
|
||||||
|
:props="treeProps"
|
||||||
|
highlight-current
|
||||||
|
@node-click="handleNodeClick"
|
||||||
|
:expand-on-click-node="expandOnClickNode"
|
||||||
|
default-expand-all />
|
||||||
|
</el-select>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
|
||||||
|
import {getBaseWarehouseList} from "@/api/base/warehouse";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "WarehouseChoose",
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
warehouseSelected: undefined,
|
||||||
|
expandOnClickNode: true,
|
||||||
|
warehouseList: [],
|
||||||
|
treeProps:{
|
||||||
|
label: "name",
|
||||||
|
children: "children"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.listWarehouse()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
async listWarehouse(){
|
||||||
|
const res = await getBaseWarehouseList()
|
||||||
|
this.warehouseList = this.handleTree(res.data, 'id', 'parentId',"children","0")
|
||||||
|
},
|
||||||
|
optionData(array, result=[]){
|
||||||
|
array.forEach(item => {
|
||||||
|
result.push({label: item.name, value: item.id})
|
||||||
|
if (item.children && item.children.length !== 0){
|
||||||
|
this.optionData(item.children, result)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
return JSON.parse(JSON.stringify(result))
|
||||||
|
},
|
||||||
|
handleNodeClick(node){
|
||||||
|
this.$emit("selected", node)
|
||||||
|
this.warehouseSelected = node.name
|
||||||
|
this.$refs.selectTree.blur()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
|
||||||
|
</style>
|
@ -21,14 +21,18 @@
|
|||||||
<el-input v-model="queryParams.soNo" style="width: 18rem" placeholder="请输入单号、备注"/>
|
<el-input v-model="queryParams.soNo" style="width: 18rem" placeholder="请输入单号、备注"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item v-if="soByType" label="状态" prop="soStatus">
|
<el-form-item v-if="soByType" label="状态" prop="soStatus">
|
||||||
<el-select v-model="queryParams.soStatus">
|
<el-select v-model="queryParams.soStatus" clearable>
|
||||||
|
<el-option v-for="item in getStatus"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item v-if="!soByType" label="领料人" prop="userId">
|
<el-form-item v-if="!soByType" label="领料人" prop="userId">
|
||||||
<StaffChoose @selected="getStaff"/>
|
<StaffChoose @selected="getStaff"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item :label="soByType ? '采购门店' : '领料门店'" prop="corpId">
|
<el-form-item :label="soByType ? '采购门店' : '领料门店'" prop="corpId">
|
||||||
<CorpChoose />
|
<CorpChoose @selected="getCompany"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
|
<el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
|
||||||
@ -112,9 +116,16 @@
|
|||||||
import SupplierChoose from "@/views/repair/Components/SupplierChoose.vue";
|
import SupplierChoose from "@/views/repair/Components/SupplierChoose.vue";
|
||||||
import CorpChoose from "@/views/repair/Components/CorpChoose.vue";
|
import CorpChoose from "@/views/repair/Components/CorpChoose.vue";
|
||||||
import StaffChoose from "@/views/repair/Components/StaffChoose.vue";
|
import StaffChoose from "@/views/repair/Components/StaffChoose.vue";
|
||||||
|
import {DICT_TYPE} from "@/utils/dict";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "SoIndex",
|
name: "SoIndex",
|
||||||
|
computed: {
|
||||||
|
getStatus(){
|
||||||
|
const data = this.getDictDatas(DICT_TYPE.REPAIR_SO_STATUS)
|
||||||
|
return data.filter(item => item.label.toString().indexOf("领料") === -1)
|
||||||
|
}
|
||||||
|
},
|
||||||
components:{
|
components:{
|
||||||
StaffChoose,
|
StaffChoose,
|
||||||
SupplierChoose,
|
SupplierChoose,
|
||||||
@ -164,6 +175,10 @@ export default {
|
|||||||
getStaff(data){
|
getStaff(data){
|
||||||
this.queryParams.userId = data.id
|
this.queryParams.userId = data.id
|
||||||
this.queryParams.userName = data.name
|
this.queryParams.userName = data.name
|
||||||
|
},
|
||||||
|
// 门店选择
|
||||||
|
getCompany(data){
|
||||||
|
console.log(data)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
<!-- 供应商 组件 -->
|
<!-- 供应商 组件 -->
|
||||||
<el-form-item v-if="soByType" label="供应商" prop="supplierId">
|
<el-form-item v-if="soByType" label="供应商" prop="supplierId">
|
||||||
<SupplierChoose />
|
<SupplierChoose @selected="getSupplier"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<!-- 日期 内嵌 -->
|
<!-- 日期 内嵌 -->
|
||||||
<el-form-item label="日期" prop="soTime">
|
<el-form-item label="日期" prop="soTime">
|
||||||
@ -29,14 +29,14 @@
|
|||||||
<!-- 选择商品 组件 -->
|
<!-- 选择商品 组件 -->
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="选择商品">
|
<el-form-item label="选择商品">
|
||||||
<PartChoose />
|
<PartChoose @selected="getPart"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<!-- 商品表格 组件 -->
|
<!-- 商品表格 组件 -->
|
||||||
<el-row :gutter="20">
|
<el-row :gutter="20">
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
<SoTable :so-by-type="soByType"/>
|
<SoTable :part-list="partList" :so-by-type="soByType" @deleteItem="deleteItem"/>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row :gutter="2" style="margin-top: 1rem">
|
<el-row :gutter="2" style="margin-top: 1rem">
|
||||||
@ -90,7 +90,8 @@ export default {
|
|||||||
userName: null,
|
userName: null,
|
||||||
partList: []
|
partList: []
|
||||||
},
|
},
|
||||||
staffRole: "采购员"
|
staffRole: "采购员",
|
||||||
|
partList: [],
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
@ -98,10 +99,31 @@ export default {
|
|||||||
this.staffRole = this.soByType ? this.staffRole : "领料人"
|
this.staffRole = this.soByType ? this.staffRole : "领料人"
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// 得到员工选择组件回传的值
|
// 得到选择的员工
|
||||||
getStaff(data) {
|
getStaff(data) {
|
||||||
this.formData.userId = data.id
|
this.formData.userId = data.id
|
||||||
this.formData.userName = data.name
|
this.formData.userName = data.name
|
||||||
|
},
|
||||||
|
// 得到选择的供应商
|
||||||
|
getSupplier(data) {
|
||||||
|
console.log(data)
|
||||||
|
},
|
||||||
|
// 得到选择的商品
|
||||||
|
async getPart(data) {
|
||||||
|
const flag = this.partList.find(item => item.id === data.id)
|
||||||
|
if (flag) {
|
||||||
|
try {
|
||||||
|
await this.$modal.confirm(`${data.name}已存在,确定要重复添加?`)
|
||||||
|
this.partList.push(data)
|
||||||
|
} catch {
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
this.partList.push(data)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 删除数据
|
||||||
|
deleteItem(index) {
|
||||||
|
this.partList.splice(index, 1)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true">
|
<el-table v-loading="loading" :data="partList" :stripe="true" :show-overflow-tooltip="true">
|
||||||
<el-table-column label="序号" align="center">
|
<el-table-column label="序号" align="center">
|
||||||
<template scope="scope">
|
<template scope="scope">
|
||||||
<span>{{ scope.$index + 1 }}</span>
|
<span>{{ scope.$index + 1 }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="商品名称" align="center" width="200"/>
|
<el-table-column label="商品名称" align="center" prop="name" width="200"/>
|
||||||
<el-table-column label="规格" align="center" width="180"/>
|
<el-table-column label="规格" align="center" width="180"/>
|
||||||
<el-table-column label="商品编码" align="center" width="180"/>
|
<el-table-column label="商品编码" align="center" width="180"/>
|
||||||
<el-table-column label="仓库" align="center" width="150"/>
|
<el-table-column label="仓库" align="center" width="150"/>
|
||||||
@ -18,7 +18,7 @@
|
|||||||
<el-table-column label="备注" align="center" width="180"/>
|
<el-table-column label="备注" align="center" width="180"/>
|
||||||
<el-table-column label="操作" fixed="right" align="center" width="150">
|
<el-table-column label="操作" fixed="right" align="center" width="150">
|
||||||
<template v-slot="scope">
|
<template v-slot="scope">
|
||||||
<el-button size="mini" type="text" icon="el-icon-delete"
|
<el-button size="mini" type="text" icon="el-icon-delete" @click="deleteItem(scope.$index)"
|
||||||
>删除
|
>删除
|
||||||
</el-button>
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
@ -34,6 +34,11 @@ export default {
|
|||||||
type: Boolean,
|
type: Boolean,
|
||||||
defaultValue: true,
|
defaultValue: true,
|
||||||
required: true
|
required: true
|
||||||
|
},
|
||||||
|
partList:{
|
||||||
|
type: Array,
|
||||||
|
defaultValue: false,
|
||||||
|
required: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
@ -43,7 +48,10 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
// 通知父组件,删除数据
|
||||||
|
deleteItem(index){
|
||||||
|
this.$emit("deleteItem", index)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
<CorpChoose />
|
<CorpChoose />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item v-if="soByType" label="所属库位" prop="corpId">
|
<el-form-item v-if="soByType" label="所属库位" prop="corpId">
|
||||||
<CorpChoose />
|
<WarehouseChoose @selected="getWarehouse"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" icon="el-icon-search">搜索</el-button>
|
<el-button type="primary" icon="el-icon-search">搜索</el-button>
|
||||||
@ -67,10 +67,11 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import CorpChoose from "@/views/repair/Components/CorpChoose.vue";
|
import CorpChoose from "@/views/repair/Components/CorpChoose.vue";
|
||||||
|
import WarehouseChoose from "@/views/repair/Components/WarehouseChoose.vue";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "SoiTable",
|
name: "SoiTable",
|
||||||
components: {CorpChoose},
|
components: {WarehouseChoose, CorpChoose},
|
||||||
props: {
|
props: {
|
||||||
soByType: {
|
soByType: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
@ -93,7 +94,11 @@ export default {
|
|||||||
total: 0,
|
total: 0,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {}
|
methods: {
|
||||||
|
// 库位选择
|
||||||
|
getWarehouse(data){
|
||||||
|
},
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
@ -19,8 +19,9 @@
|
|||||||
<el-form-item label="调入门店" prop="corpId">
|
<el-form-item label="调入门店" prop="corpId">
|
||||||
<CorpChoose />
|
<CorpChoose />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="审核状态">
|
<el-form-item label="审核状态" prop="">
|
||||||
<el-select v-model="queryParams.is">
|
<el-select v-model="queryParams.stStatus">
|
||||||
|
<el-option v-for="item in this.getDictDatas(DICT_TYPE.REPAIR_ST_STATUS)" :key="item.value" :label="item.label" :value="item.value" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
@ -92,7 +93,9 @@ export default {
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
queryParams:{},
|
queryParams:{
|
||||||
|
stStatus: null
|
||||||
|
},
|
||||||
showSearch: true,
|
showSearch: true,
|
||||||
loading: false,
|
loading: false,
|
||||||
list: [],
|
list: [],
|
||||||
|
@ -23,13 +23,13 @@
|
|||||||
<StaffChoose @selected="getStaff"/>
|
<StaffChoose @selected="getStaff"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="选择商品">
|
<el-form-item label="选择商品">
|
||||||
<PartChoose/>
|
<PartChoose @selected="getPart"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row :gutter="20">
|
<el-row :gutter="20">
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
<StTable/>
|
<StTable :part-list="partList" @deleteItem="deleteItem"/>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row :gutter="20" style="margin-top: 1rem">
|
<el-row :gutter="20" style="margin-top: 1rem">
|
||||||
@ -82,14 +82,33 @@ export default {
|
|||||||
formData: {
|
formData: {
|
||||||
stNo: null,
|
stNo: null,
|
||||||
},
|
},
|
||||||
|
partList: []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.formData.stNo = createUniqueCodeByHead("DB")
|
this.formData.stNo = createUniqueCodeByHead("DB")
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
// 选择员工
|
||||||
getStaff(data) {
|
getStaff(data) {
|
||||||
|
|
||||||
|
},
|
||||||
|
// 选择商品
|
||||||
|
async getPart(data){
|
||||||
|
const flag = this.partList.find(item => item.id === data.id)
|
||||||
|
if (flag) {
|
||||||
|
try {
|
||||||
|
await this.$modal.confirm(`${data.name}已存在,确定要重复添加?`)
|
||||||
|
this.partList.push(data)
|
||||||
|
} catch {
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
this.partList.push(data)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 删除商品
|
||||||
|
deleteItem(index){
|
||||||
|
this.partList.splice(index, 1)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true">
|
<el-table v-loading="loading" :data="partList" :stripe="true" :show-overflow-tooltip="true">
|
||||||
<el-table-column label="序号" align="center">
|
<el-table-column label="序号" align="center">
|
||||||
<template scope="scope">
|
<template scope="scope">
|
||||||
<span>{{ scope.$index + 1 }}</span>
|
<span>{{ scope.$index + 1 }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="商品名称" align="center" width="200"/>
|
<el-table-column label="商品名称" align="center" prop="name" width="200"/>
|
||||||
<el-table-column label="规格" align="center" width="180"/>
|
<el-table-column label="规格" align="center" width="180"/>
|
||||||
<el-table-column label="单位" align="center" width="150"/>
|
<el-table-column label="单位" align="center" width="150"/>
|
||||||
<el-table-column label="原库位" align="center" width="150"/>
|
<el-table-column label="原库位" align="center" width="150"/>
|
||||||
@ -17,7 +17,7 @@
|
|||||||
<el-table-column label="备注" align="center" width="180"/>
|
<el-table-column label="备注" align="center" width="180"/>
|
||||||
<el-table-column label="操作" fixed="right" align="center" width="150">
|
<el-table-column label="操作" fixed="right" align="center" width="150">
|
||||||
<template v-slot="scope">
|
<template v-slot="scope">
|
||||||
<el-button size="mini" type="text" icon="el-icon-delete"
|
<el-button size="mini" type="text" icon="el-icon-delete" @click="deleteItem(scope.$index)"
|
||||||
>删除
|
>删除
|
||||||
</el-button>
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
@ -28,13 +28,25 @@
|
|||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
name: "StTable",
|
name: "StTable",
|
||||||
|
props:{
|
||||||
|
partList:{
|
||||||
|
type: Array,
|
||||||
|
defaultValue: false,
|
||||||
|
required: true
|
||||||
|
}
|
||||||
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
loading: false,
|
loading: false,
|
||||||
list: [],
|
list: [],
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {}
|
methods: {
|
||||||
|
// 通知父组件,删除元素
|
||||||
|
deleteItem(index){
|
||||||
|
this.$emit("deleteItem", index)
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
@ -16,8 +16,13 @@
|
|||||||
<el-form-item v-if="TicketType === 'tp'" label="服务顾问" prop="userId">
|
<el-form-item v-if="TicketType === 'tp'" label="服务顾问" prop="userId">
|
||||||
<StaffChoose />
|
<StaffChoose />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item v-if="!(TicketType === 'tv')" label="维修类别" prop="userId">
|
<el-form-item v-if="TicketType === 'tu'" label="维修类别" prop="repairType">
|
||||||
<StaffChoose />
|
<el-select v-model="queryParams.repairType" size="small">
|
||||||
|
<el-option v-for="item in this.getDictDatas(DICT_TYPE.REPAIR_TYPE)" :key="item.value" :label="item.label" :value="item.value" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item v-if="TicketType === 'tp'" label="类型" prop="repairType">
|
||||||
|
<RepairTypeChoose @selected="getRepairType" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="门店" prop="userId">
|
<el-form-item label="门店" prop="userId">
|
||||||
<SupplierChoose />
|
<SupplierChoose />
|
||||||
@ -45,13 +50,15 @@
|
|||||||
import StaffChoose from "@/views/repair/Components/StaffChoose.vue";
|
import StaffChoose from "@/views/repair/Components/StaffChoose.vue";
|
||||||
import SupplierChoose from "@/views/repair/Components/SupplierChoose.vue";
|
import SupplierChoose from "@/views/repair/Components/SupplierChoose.vue";
|
||||||
import TicketTable from "@/views/repair/tickets/Components/TicketTable.vue";
|
import TicketTable from "@/views/repair/tickets/Components/TicketTable.vue";
|
||||||
|
import RepairTypeChoose from "@/views/repair/Components/RepairTypeChoose.vue";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "TicketSearch",
|
name: "TicketSearch",
|
||||||
components: {
|
components: {
|
||||||
TicketTable,
|
TicketTable,
|
||||||
StaffChoose,
|
StaffChoose,
|
||||||
SupplierChoose
|
SupplierChoose,
|
||||||
|
RepairTypeChoose
|
||||||
},
|
},
|
||||||
props:{
|
props:{
|
||||||
TicketType:{
|
TicketType:{
|
||||||
@ -67,7 +74,12 @@ export default {
|
|||||||
total: 0,
|
total: 0,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {}
|
methods: {
|
||||||
|
// 类型选择
|
||||||
|
getRepairType(data){
|
||||||
|
console.log(data)
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
<template slot="label">
|
<template slot="label">
|
||||||
用户选择
|
用户选择
|
||||||
</template>
|
</template>
|
||||||
<UserChoose />
|
<UserChoose @selected="getUser"/>
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item>
|
<el-descriptions-item>
|
||||||
<template slot="label">
|
<template slot="label">
|
||||||
@ -99,14 +99,17 @@
|
|||||||
<el-button size="small">质保说明</el-button>
|
<el-button size="small">质保说明</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="4.8">
|
<el-col :span="4.8">
|
||||||
<el-button size="small">终检</el-button>
|
<el-button size="small" v-if="formData.endCheck" @click="formData.endCheck = 0">终检</el-button>
|
||||||
|
<el-button size="small" v-if="!formData.endCheck" @click="formData.endCheck = 1">不终检</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="4.8">
|
<el-col :span="4.8">
|
||||||
<el-select size="small">
|
<el-select v-model="formData.partDisposal" size="small">
|
||||||
|
<el-option v-for="item in this.getDictDatas(DICT_TYPE.REPAIR_PART_DISPOSAL)" :key="item.value" :label="item.label" :value="item.value" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="4.8">
|
<el-col :span="4.8">
|
||||||
<el-select size="small">
|
<el-select v-model="formData.repairType" size="small">
|
||||||
|
<el-option v-for="item in this.getDictDatas(DICT_TYPE.REPAIR_TYPE)" :key="item.value" :label="item.label" :value="item.value" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
@ -190,12 +193,22 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {}
|
return {
|
||||||
|
formData:{
|
||||||
|
endCheck: 1,
|
||||||
|
partDisposal:'01',
|
||||||
|
repairType: '01',
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
methods: {}
|
methods: {
|
||||||
|
// 选择用户
|
||||||
|
getUser(data){
|
||||||
|
console.log(data)
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
Loading…
Reference in New Issue
Block a user