Compare commits
No commits in common. "f191c11b754ccc0d4133eefd36a162a082a79a30" and "cf70fa27a3c1ec72fb3f776a55f24005d4910fd3" have entirely different histories.
f191c11b75
...
cf70fa27a3
@ -1,4 +1,4 @@
|
|||||||
import {v4 as uuidv4} from 'uuid'
|
import { v4 as uuidv4 } from 'uuid'
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 生成UUID
|
* 生成UUID
|
||||||
@ -24,14 +24,3 @@ export function createHashCodeByStr(str) {
|
|||||||
// 将整数转换为16进制字符串,以缩短code长度
|
// 将整数转换为16进制字符串,以缩短code长度
|
||||||
return Math.abs(hash).toString(16)
|
return Math.abs(hash).toString(16)
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 生成一个16位的纯数字的唯一ID
|
|
||||||
* 生成策略 head + 当前时间戳 + 随机数
|
|
||||||
* @param head 前缀
|
|
||||||
*/
|
|
||||||
export function createUniqueCodeByHead(head = '') {
|
|
||||||
const min = 100; // 最小值
|
|
||||||
const max = 999; // 最大值
|
|
||||||
return head.toString() + Date.now().toString() + Math.floor(Math.random() * (max - min + 1)) + min;
|
|
||||||
}
|
|
||||||
|
@ -107,7 +107,7 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="库存" :render-header="addRedStar" key="95">
|
<el-table-column label="库存" :render-header="addRedStar" key="95">
|
||||||
<template v-slot="scope">
|
<template v-slot="scope">
|
||||||
<el-form-item :prop="'rates.'+ scope.$index + '.stockOperate'" :rules="[{required: true, trigger: 'change'}]">
|
<el-form-item :prop="'rates.'+ scope.$index + '.stock'" :rules="[{required: true, trigger: 'change'}]">
|
||||||
<el-input v-model="scope.row.stock" oninput="value=value.replace(/^(0+)|[^\d]+/g,'')"></el-input>
|
<el-input v-model="scope.row.stock" oninput="value=value.replace(/^(0+)|[^\d]+/g,'')"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
|
@ -1,22 +0,0 @@
|
|||||||
<template>
|
|
||||||
<el-select v-model="corpSelected" clearable filterable>
|
|
||||||
<el-option v-for="staff in corpList" :key="staff.id" :label="staff.name" :value="staff.id"/>
|
|
||||||
</el-select>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
export default {
|
|
||||||
name: "",
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
corpSelected: undefined,
|
|
||||||
corpList: null
|
|
||||||
}
|
|
||||||
},
|
|
||||||
methods: {}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style scoped lang="scss">
|
|
||||||
|
|
||||||
</style>
|
|
@ -1,30 +0,0 @@
|
|||||||
<template>
|
|
||||||
<el-select v-model="partSelected" clearable filterable style="width: 45rem">
|
|
||||||
<el-option v-for="part in partList" :key="part.id" :label="part.name" :value="part.id"/>
|
|
||||||
</el-select>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
export default {
|
|
||||||
name: "PartChoose",
|
|
||||||
data(){
|
|
||||||
return{
|
|
||||||
partSelected: undefined,
|
|
||||||
partList: null,
|
|
||||||
}
|
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
this.listPart()
|
|
||||||
},
|
|
||||||
methods:{
|
|
||||||
// TODO 获取商品信息
|
|
||||||
async listPart(){
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style scoped lang="scss">
|
|
||||||
|
|
||||||
</style>
|
|
@ -1,23 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div class="app-container">
|
|
||||||
商品新增
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
export default {
|
|
||||||
name: "PartCreate",
|
|
||||||
data(){
|
|
||||||
return{
|
|
||||||
|
|
||||||
}
|
|
||||||
},
|
|
||||||
methods:{
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style scoped lang="scss">
|
|
||||||
|
|
||||||
</style>
|
|
@ -1,42 +0,0 @@
|
|||||||
<template>
|
|
||||||
<el-select v-model="staffSelected" clearable filterable>
|
|
||||||
<el-option v-for="staff in staffList" :key="staff.id" :label="staff.name" :value="staff.id"/>
|
|
||||||
</el-select>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
|
|
||||||
import {getStaffList} from "@/api/company/staff";
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: "StaffChoose",
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
staffList: [],
|
|
||||||
staffSelected: undefined,
|
|
||||||
}
|
|
||||||
},
|
|
||||||
watch:{
|
|
||||||
staffSelected(val) {
|
|
||||||
const staff = this.staffList.find(item => item.id === val);
|
|
||||||
this.$emit("selected", staff);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
this.listStaff()
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
async listStaff() {
|
|
||||||
try {
|
|
||||||
const res = await getStaffList()
|
|
||||||
this.staffList = res.data
|
|
||||||
} catch {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style scoped lang="scss">
|
|
||||||
|
|
||||||
</style>
|
|
@ -1,174 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div>
|
|
||||||
<!-- 搜索 -->
|
|
||||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="90px">
|
|
||||||
<el-form-item :label="soByType ? '采购时间' : '领料时间'" prop="searchTimeArray">
|
|
||||||
<el-date-picker
|
|
||||||
v-model="queryParams.searchTimeArray"
|
|
||||||
type="daterange"
|
|
||||||
range-separator="至"
|
|
||||||
start-placeholder="开始日期"
|
|
||||||
end-placeholder="结束日期">
|
|
||||||
</el-date-picker>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item v-if="soByType && !goodsYes" label="供应商" prop="supplierId">
|
|
||||||
<SupplierChoose />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item v-if="goodsYes" label="关键字" prop="soNo">
|
|
||||||
<el-input v-model="queryParams.soNo" style="width: 18rem" placeholder="请输入单号、商品名称或编码"/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item v-else label="单据号" prop="soNo">
|
|
||||||
<el-input v-model="queryParams.soNo" style="width: 18rem" placeholder="请输入单号、备注"/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item v-if="soByType" label="状态" prop="soStatus">
|
|
||||||
<el-select v-model="queryParams.soStatus">
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item v-if="!soByType" label="领料人" prop="userId">
|
|
||||||
<StaffChoose @selected="getStaff"/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item :label="soByType ? '采购门店' : '领料门店'" prop="corpId">
|
|
||||||
<CorpChoose />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item>
|
|
||||||
<el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
|
|
||||||
<el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
|
|
||||||
</el-form-item>
|
|
||||||
</el-form>
|
|
||||||
<!-- 操作 -->
|
|
||||||
<el-row :gutter="10" class="mb8">
|
|
||||||
<el-col :span="1.5">
|
|
||||||
<el-button type="primary" plain icon="el-icon-download" size="mini"
|
|
||||||
>导出
|
|
||||||
</el-button>
|
|
||||||
</el-col>
|
|
||||||
<right-toolbar :showSearch.sync="showSearch"></right-toolbar>
|
|
||||||
</el-row>
|
|
||||||
<!-- 急件 -->
|
|
||||||
<el-table v-if="goodsYes" v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true">
|
|
||||||
<el-table-column label="序号" align="center">
|
|
||||||
<template scope="scope">
|
|
||||||
<span>{{ scope.$index + 1 }}</span>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="单号" align="center" prop="soNo" width="180" />
|
|
||||||
<el-table-column label="商品名称" align="center" width="180" prop="name" />
|
|
||||||
<el-table-column label="规格" align="center" width="180" prop="name" />
|
|
||||||
<el-table-column label="商品编码" align="center" width="180" prop="name" />
|
|
||||||
<el-table-column label="所属分类" align="center" width="150" prop="name" />
|
|
||||||
<el-table-column label="数量" align="center" width="150" prop="name" />
|
|
||||||
<el-table-column label="单位" align="center" width="150" prop="name" />
|
|
||||||
<el-table-column label="成本" align="center" width="150" prop="name" />
|
|
||||||
<el-table-column label="供应商" align="center" width="180" prop="name" />
|
|
||||||
<el-table-column label="仓库" align="center" width="150" prop="name" />
|
|
||||||
<el-table-column label="状态" align="center" width="150" prop="name" />
|
|
||||||
<el-table-column label="时间" align="center" width="150" prop="name" />
|
|
||||||
<el-table-column label="门店" align="center" width="180" prop="name" />
|
|
||||||
<el-table-column label="操作" align="center" width="180" fixed="right">
|
|
||||||
<template v-slot="scope">
|
|
||||||
<el-button size="mini" type="text" icon="el-icon-edit"
|
|
||||||
>审核
|
|
||||||
</el-button>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
</el-table>
|
|
||||||
|
|
||||||
<!-- 采购/领料 -->
|
|
||||||
<el-table v-else v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true">
|
|
||||||
<el-table-column label="序号" align="center">
|
|
||||||
<template scope="scope">
|
|
||||||
<span>{{ scope.$index + 1 }}</span>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="单号" align="center" prop="soNo" width="180" />
|
|
||||||
<el-table-column label="数量" align="center" prop="itemCount" width="150" />
|
|
||||||
<el-table-column label="金额" align="center" prop="totalPrice" width="150" />
|
|
||||||
<el-table-column :label="soByType ? '采购员' : '领料人'" align="center" prop="userName" width="150" />
|
|
||||||
<el-table-column v-if="soByType" label="供应商" align="center" prop="supplierName" width="150" />
|
|
||||||
<el-table-column :label="soByType ? '入库时间' : '领料时间'" align="center" prop="soTime" width="150" />
|
|
||||||
<el-table-column label="登记时间" align="center" prop="createTime" width="150" />
|
|
||||||
<el-table-column label="门店" align="center" prop="corpName" width="180" />
|
|
||||||
<el-table-column v-if="soByType" label="状态" align="center" prop="soStatus" width="150" />
|
|
||||||
<el-table-column label="备注" align="center" prop="remark" width="180" />
|
|
||||||
<el-table-column label="操作" fixed="right" width="180" align="center">
|
|
||||||
<template v-slot="scope">
|
|
||||||
<el-button size="mini" type="text" icon="el-icon-edit"
|
|
||||||
>修改
|
|
||||||
</el-button>
|
|
||||||
<el-button size="mini" type="text" icon="el-icon-close"
|
|
||||||
>作废
|
|
||||||
</el-button>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
</el-table>
|
|
||||||
<!-- 分页 -->
|
|
||||||
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNo" :limit.sync="queryParams.pageSize"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
|
|
||||||
import SupplierChoose from "@/views/repair/stockOperate/Components/SupplierChoose.vue";
|
|
||||||
import CorpChoose from "@/views/repair/Components/CorpChoose.vue";
|
|
||||||
import StaffChoose from "@/views/repair/Components/StaffChoose.vue";
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: "SoIndex",
|
|
||||||
components:{
|
|
||||||
StaffChoose,
|
|
||||||
SupplierChoose,
|
|
||||||
CorpChoose
|
|
||||||
},
|
|
||||||
props:{
|
|
||||||
soByType: {
|
|
||||||
type: Boolean,
|
|
||||||
defaultValue: true,
|
|
||||||
required: true
|
|
||||||
},
|
|
||||||
goodsYes: {
|
|
||||||
type: Boolean,
|
|
||||||
defaultValue: false,
|
|
||||||
required: false
|
|
||||||
}
|
|
||||||
},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
queryParams:{
|
|
||||||
pageNo: 1,
|
|
||||||
pageSize: 10,
|
|
||||||
searchTimeArray:[],
|
|
||||||
soNo: null,
|
|
||||||
supplierId: null,
|
|
||||||
supplierName: null,
|
|
||||||
soStatus: null,
|
|
||||||
corpId: null,
|
|
||||||
userId: null,
|
|
||||||
userName: null
|
|
||||||
},
|
|
||||||
showSearch: true,
|
|
||||||
list: [],
|
|
||||||
loading: false,
|
|
||||||
total: 0
|
|
||||||
}
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
// 搜索按钮
|
|
||||||
handleQuery(){},
|
|
||||||
// 搜索重置
|
|
||||||
resetQuery(){
|
|
||||||
this.resetForm('queryForm')
|
|
||||||
this.handleQuery()
|
|
||||||
},
|
|
||||||
// 员工选择组件的回调
|
|
||||||
getStaff(data){
|
|
||||||
this.queryParams.userId = data.id
|
|
||||||
this.queryParams.userName = data.name
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style scoped lang="scss">
|
|
||||||
|
|
||||||
</style>
|
|
@ -1,112 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div>
|
|
||||||
<el-form :model="formData" size="small" :inline="true" label-width="80px">
|
|
||||||
<el-row :gutter="20">
|
|
||||||
<el-col :span="24">
|
|
||||||
<!-- 供应商 组件 -->
|
|
||||||
<el-form-item v-if="soByType" label="供应商" prop="supplierId">
|
|
||||||
<SupplierChoose />
|
|
||||||
</el-form-item>
|
|
||||||
<!-- 日期 内嵌 -->
|
|
||||||
<el-form-item label="日期" prop="soTime">
|
|
||||||
<el-date-picker
|
|
||||||
v-model="formData.soTime"
|
|
||||||
type="date"
|
|
||||||
placeholder="选择日期">
|
|
||||||
</el-date-picker>
|
|
||||||
</el-form-item>
|
|
||||||
<!-- 单据编号 内嵌 -->
|
|
||||||
<el-form-item label="单据编号" prop="soNo">
|
|
||||||
<el-input disabled v-model="formData.soNo" style="width: 20rem"/>
|
|
||||||
</el-form-item>
|
|
||||||
<!-- 采购员/领料人 组件 -->
|
|
||||||
<el-form-item :label="staffRole" prop="userId">
|
|
||||||
<StaffChoose @selected="getStaff"/>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-row :gutter="2">
|
|
||||||
<!-- 选择商品 组件 -->
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="选择商品">
|
|
||||||
<PartChoose />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<!-- 商品表格 组件 -->
|
|
||||||
<el-row :gutter="20">
|
|
||||||
<el-col :span="24">
|
|
||||||
<SoTable :so-by-type="soByType"/>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-row :gutter="2" style="margin-top: 1rem">
|
|
||||||
<!-- 备注 -->
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="备注">
|
|
||||||
<el-input style="width: 45rem" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<!-- 按钮操作 -->
|
|
||||||
<el-col :span="12" style="text-align: right">
|
|
||||||
<el-button v-if="soByType" type="danger">结算</el-button>
|
|
||||||
<el-button v-else type="primary">确定</el-button>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
</el-form>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
|
|
||||||
import StaffChoose from "@/views/repair/Components/StaffChoose.vue";
|
|
||||||
import PartChoose from "@/views/repair/Components/PartChoose.vue";
|
|
||||||
import SoTable from "@/views/repair/stockOperate/Components/SoTable.vue";
|
|
||||||
import SupplierChoose from "@/views/repair/stockOperate/Components/SupplierChoose.vue";
|
|
||||||
import {createUniqueCodeByHead} from "@/utils/createUniqueCode";
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: "SoInfo",
|
|
||||||
components: {
|
|
||||||
StaffChoose,
|
|
||||||
PartChoose,
|
|
||||||
SoTable,
|
|
||||||
SupplierChoose
|
|
||||||
},
|
|
||||||
props:{
|
|
||||||
soByType:{
|
|
||||||
type: Boolean,
|
|
||||||
defaultValue: true,
|
|
||||||
required: true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
formData: {
|
|
||||||
soNo: null,
|
|
||||||
supplierId: null,
|
|
||||||
supplierName: null,
|
|
||||||
soTime: Date.now(),
|
|
||||||
userId: null,
|
|
||||||
userName: null,
|
|
||||||
partList: []
|
|
||||||
},
|
|
||||||
staffRole: "采购员"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
this.formData.soNo = createUniqueCodeByHead(this.soByType ? "CG" : "LL")
|
|
||||||
this.staffRole = this.soByType ? this.staffRole : "领料人"
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
// 得到员工选择组件回传的值
|
|
||||||
getStaff(data) {
|
|
||||||
this.formData.userId = data.id
|
|
||||||
this.formData.userName = data.name
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style scoped lang="scss">
|
|
||||||
|
|
||||||
</style>
|
|
@ -1,53 +0,0 @@
|
|||||||
<template>
|
|
||||||
<el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true">
|
|
||||||
<el-table-column label="序号" align="center">
|
|
||||||
<template scope="scope">
|
|
||||||
<span>{{ scope.$index + 1 }}</span>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="商品名称" align="center" 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"/>
|
|
||||||
<el-table-column :label="soByType ? '上次进价' : '成本'" align="center" width="150"/>
|
|
||||||
<el-table-column v-if="soByType" label="采购进价" align="center" width="150"/>
|
|
||||||
<el-table-column :label="soByType ? '采购金额' : '合计'" align="center" width="150"/>
|
|
||||||
<el-table-column label="备注" align="center" width="180"/>
|
|
||||||
<el-table-column label="操作" fixed="right" align="center" width="150">
|
|
||||||
<template v-slot="scope">
|
|
||||||
<el-button size="mini" type="text" icon="el-icon-delete"
|
|
||||||
>删除
|
|
||||||
</el-button>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
</el-table>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
export default {
|
|
||||||
name: "SoTable",
|
|
||||||
props:{
|
|
||||||
soByType:{
|
|
||||||
type: Boolean,
|
|
||||||
defaultValue: true,
|
|
||||||
required: true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
loading: false,
|
|
||||||
list: [],
|
|
||||||
}
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style scoped lang="scss">
|
|
||||||
|
|
||||||
</style>
|
|
@ -1,105 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div>
|
|
||||||
<!-- 搜索 -->
|
|
||||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="90px">
|
|
||||||
<el-form-item label="作废时间" prop="searchTimeArray">
|
|
||||||
<el-date-picker
|
|
||||||
v-model="queryParams.searchTimeArray"
|
|
||||||
type="daterange"
|
|
||||||
range-separator="至"
|
|
||||||
start-placeholder="开始日期"
|
|
||||||
end-placeholder="结束日期">
|
|
||||||
</el-date-picker>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item v-if="soByType" label="供应商" prop="supplierId">
|
|
||||||
<SupplierChoose />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="单据号" prop="soNo">
|
|
||||||
<el-input v-model="queryParams.soNo" style="width: 18rem" placeholder="请输入单号、备注"/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item v-if="!soByType" label="领料人" prop="userId">
|
|
||||||
<StaffChoose @selected="getStaff"/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item :label="soByType ? '采购门店' : '领料门店'" prop="corpId">
|
|
||||||
<CorpChoose />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item>
|
|
||||||
<el-button type="primary" icon="el-icon-search">搜索</el-button>
|
|
||||||
<el-button icon="el-icon-refresh">重置</el-button>
|
|
||||||
</el-form-item>
|
|
||||||
</el-form>
|
|
||||||
<!-- 操作 -->
|
|
||||||
<el-row :gutter="10" class="mb8">
|
|
||||||
<right-toolbar :showSearch.sync="showSearch"></right-toolbar>
|
|
||||||
</el-row>
|
|
||||||
<el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true">
|
|
||||||
<el-table-column label="序号" align="center">
|
|
||||||
<template scope="scope">
|
|
||||||
<span>{{ scope.$index + 1 }}</span>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="单号" align="center" prop="soNo" width="180" />
|
|
||||||
<el-table-column label="数量" align="center" width="150" prop="name" />
|
|
||||||
<el-table-column label="金额" align="center" prop="totalPrice" width="150" />
|
|
||||||
<el-table-column :label="soByType ? '采购员' : '领料人'" align="center" prop="userName" width="150" />
|
|
||||||
<el-table-column v-if="soByType" label="供应商" align="center" prop="supplierName" width="150" />
|
|
||||||
<el-table-column :label="soByType ? '入库时间' : '领料时间'" align="center" prop="soTime" width="150" />
|
|
||||||
<el-table-column label="登记时间" align="center" prop="createTime" width="150" />
|
|
||||||
<el-table-column label="作废时间" align="center" prop="createTime" width="150" />
|
|
||||||
<el-table-column label="作废人" align="center" prop="createTime" width="150" />
|
|
||||||
<el-table-column label="门店" align="center" prop="corpName" width="180" />
|
|
||||||
<el-table-column label="作废备注" align="center" prop="remark" width="180" />
|
|
||||||
</el-table>
|
|
||||||
<!-- 分页 -->
|
|
||||||
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNo" :limit.sync="queryParams.pageSize"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import CorpChoose from "@/views/repair/Components/CorpChoose.vue";
|
|
||||||
import SupplierChoose from "@/views/repair/stockOperate/Components/SupplierChoose.vue";
|
|
||||||
import StaffChoose from "@/views/repair/Components/StaffChoose.vue";
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: "SoVoid",
|
|
||||||
components: {StaffChoose, SupplierChoose, CorpChoose},
|
|
||||||
props: {
|
|
||||||
soByType: {
|
|
||||||
type: Boolean,
|
|
||||||
defaultValue: true,
|
|
||||||
required: true
|
|
||||||
},
|
|
||||||
},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
queryParams:{
|
|
||||||
pageNo: 1,
|
|
||||||
pageSize: 10,
|
|
||||||
searchTimeArray:[],
|
|
||||||
soNo: null,
|
|
||||||
supplierId: null,
|
|
||||||
supplierName: null,
|
|
||||||
corpId: null,
|
|
||||||
userId: null,
|
|
||||||
userName: null
|
|
||||||
},
|
|
||||||
showSearch: true,
|
|
||||||
loading: false,
|
|
||||||
list: [],
|
|
||||||
total: 0,
|
|
||||||
}
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
// 子组件回调
|
|
||||||
getStaff(data){
|
|
||||||
this.queryParams.userId = data.id
|
|
||||||
this.queryParams.userName = data.name
|
|
||||||
},
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style scoped lang="scss">
|
|
||||||
|
|
||||||
</style>
|
|
@ -1,102 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div>
|
|
||||||
<!-- 搜索 -->
|
|
||||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="90px">
|
|
||||||
<el-form-item :label="soByType ? '采购时间' : '领料时间'" prop="searchTimeArray">
|
|
||||||
<el-date-picker
|
|
||||||
v-model="queryParams.searchTimeArray"
|
|
||||||
type="daterange"
|
|
||||||
range-separator="至"
|
|
||||||
start-placeholder="开始日期"
|
|
||||||
end-placeholder="结束日期">
|
|
||||||
</el-date-picker>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="关键字" prop="soNo">
|
|
||||||
<el-input v-model="queryParams.soNo" style="width: 18rem" placeholder="请输入单号、商品名称或编码"/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item v-if="soByType" label="规格" prop="soNo">
|
|
||||||
<el-input v-model="queryParams.soNo" style="width: 18rem" placeholder="请输入单号、商品名称或编码"/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item :label="soByType ? '采购门店' : '领料门店'" prop="corpId">
|
|
||||||
<CorpChoose />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item v-if="soByType" label="所属库位" prop="corpId">
|
|
||||||
<CorpChoose />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item>
|
|
||||||
<el-button type="primary" icon="el-icon-search">搜索</el-button>
|
|
||||||
<el-button icon="el-icon-refresh">重置</el-button>
|
|
||||||
</el-form-item>
|
|
||||||
</el-form>
|
|
||||||
<!-- 操作 -->
|
|
||||||
<el-row :gutter="10" class="mb8">
|
|
||||||
<el-col :span="1.5">
|
|
||||||
<el-button type="primary" plain icon="el-icon-download" size="mini"
|
|
||||||
>导出
|
|
||||||
</el-button>
|
|
||||||
</el-col>
|
|
||||||
<right-toolbar :showSearch.sync="showSearch"></right-toolbar>
|
|
||||||
</el-row>
|
|
||||||
<!-- 表格 -->
|
|
||||||
<el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true">
|
|
||||||
<el-table-column label="序号" align="center">
|
|
||||||
<template scope="scope">
|
|
||||||
<span>{{ scope.$index + 1 }}</span>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="单号" align="center" prop="soNo" width="180" />
|
|
||||||
<el-table-column label="商品名称" align="center" prop="soNo" width="180" />
|
|
||||||
<el-table-column :label="soByType ? '采购员' : '领料人'" align="center" prop="soNo" width="180" />
|
|
||||||
<el-table-column label="商品编码" align="center" prop="soNo" width="180" />
|
|
||||||
<el-table-column v-if="soByType" label="条形码" align="center" prop="soNo" width="180" />
|
|
||||||
<el-table-column label="规格" align="center" prop="soNo" width="180" />
|
|
||||||
<el-table-column label="数量" align="center" prop="itemCount" width="150" />
|
|
||||||
<el-table-column :label="soByType ? '进价' : '成本'" align="center" prop="itemCount" width="150" />
|
|
||||||
<el-table-column label="合计" align="center" prop="itemCount" width="150" />
|
|
||||||
<el-table-column v-if="soByType" label="供应商" align="center" prop="itemCount" width="180" />
|
|
||||||
<el-table-column :label="soByType ? '采购仓库' : '仓库'" align="center" prop="itemCount" width="150" />
|
|
||||||
<el-table-column label="所属门店" align="center" prop="itemCount" width="180" />
|
|
||||||
<el-table-column :label="soByType ? '入库时间' : '领料时间'" align="center" prop="itemCount" width="150" />
|
|
||||||
<el-table-column label="备注" align="center" prop="itemCount" width="180" />
|
|
||||||
</el-table>
|
|
||||||
<!-- 分页 -->
|
|
||||||
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNo" :limit.sync="queryParams.pageSize"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import CorpChoose from "@/views/repair/Components/CorpChoose.vue";
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: "SoiTable",
|
|
||||||
components: {CorpChoose},
|
|
||||||
props: {
|
|
||||||
soByType: {
|
|
||||||
type: Boolean,
|
|
||||||
defaultValue: true,
|
|
||||||
required: true
|
|
||||||
},
|
|
||||||
},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
queryParams:{
|
|
||||||
pageNo: 1,
|
|
||||||
pageSize: 10,
|
|
||||||
searchTimeArray:[],
|
|
||||||
soNo: null,
|
|
||||||
corpId: null,
|
|
||||||
},
|
|
||||||
showSearch: true,
|
|
||||||
loading: false,
|
|
||||||
list: [],
|
|
||||||
total: 0,
|
|
||||||
}
|
|
||||||
},
|
|
||||||
methods: {}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style scoped lang="scss">
|
|
||||||
|
|
||||||
</style>
|
|
@ -1,23 +0,0 @@
|
|||||||
<template>
|
|
||||||
<el-select v-model="supplierSelected">
|
|
||||||
<el-option v-for="supplier in supplierList" :key="supplier.id" :label="supplier.name"
|
|
||||||
:value="supplier.id"/>
|
|
||||||
</el-select>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
export default {
|
|
||||||
name: "",
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
supplierSelected: undefined,
|
|
||||||
supplierList: null
|
|
||||||
}
|
|
||||||
},
|
|
||||||
methods: {}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style scoped lang="scss">
|
|
||||||
|
|
||||||
</style>
|
|
@ -1,59 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div class="app-container">
|
|
||||||
<el-tabs v-model="activeTab">
|
|
||||||
<el-tab-pane label="采购单据" name="purchase">
|
|
||||||
<SoIndex :so-by-type="soByType"/>
|
|
||||||
</el-tab-pane>
|
|
||||||
<el-tab-pane label="急件单据" name="urgentPurchase">
|
|
||||||
<SoIndex :so-by-type="soByType" :goods-yes="true"/>
|
|
||||||
</el-tab-pane>
|
|
||||||
<el-tab-pane label="作废单据" name="voidPurchase">
|
|
||||||
<SoVoid :so-by-type="soByType" />
|
|
||||||
</el-tab-pane>
|
|
||||||
<el-tab-pane label="采购明细" name="detailPurchase">
|
|
||||||
<SoiTable :so-by-type="soByType" />
|
|
||||||
</el-tab-pane>
|
|
||||||
<el-tab-pane label="采购单" name="purchaseCreate">
|
|
||||||
<SoInfo :so-by-type="soByType"/>
|
|
||||||
</el-tab-pane>
|
|
||||||
</el-tabs>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
|
|
||||||
import SoInfo from "@/views/repair/stockOperate/Components/SoInfo.vue";
|
|
||||||
import SoIndex from "@/views/repair/stockOperate/Components/SoIndex.vue";
|
|
||||||
import SoVoid from "@/views/repair/stockOperate/Components/SoVoid.vue";
|
|
||||||
import SoiTable from "@/views/repair/stockOperate/Components/SoiTable.vue";
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: "InStock",
|
|
||||||
components: {
|
|
||||||
SoiTable,
|
|
||||||
SoVoid,
|
|
||||||
SoIndex,
|
|
||||||
SoInfo
|
|
||||||
},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
activeTab: "purchase",
|
|
||||||
soByType: true,
|
|
||||||
}
|
|
||||||
},
|
|
||||||
created() {
|
|
||||||
this.isType()
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
// 判断是什么单据,决定字段的属性、展示否等
|
|
||||||
async isType() {
|
|
||||||
const url = this.$route.path
|
|
||||||
this.soByType = url.includes("soi")
|
|
||||||
},
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style scoped lang="scss">
|
|
||||||
|
|
||||||
</style>
|
|
@ -1,55 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div class="app-container">
|
|
||||||
<el-tabs v-model="activeTab">
|
|
||||||
<el-tab-pane label="领料单据" name="receive">
|
|
||||||
<SoIndex :so-by-type="soByType"/>
|
|
||||||
</el-tab-pane>
|
|
||||||
<el-tab-pane label="作废单据" name="voidReceive">
|
|
||||||
<SoVoid :so-by-type="soByType" />
|
|
||||||
</el-tab-pane>
|
|
||||||
<el-tab-pane label="领料明细" name="detailReceive">
|
|
||||||
<SoiTable :so-by-type="soByType" />
|
|
||||||
</el-tab-pane>
|
|
||||||
<el-tab-pane label="领料单" name="receiveCreate">
|
|
||||||
<SoInfo :so-by-type="soByType"/>
|
|
||||||
</el-tab-pane>
|
|
||||||
</el-tabs>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import SoInfo from "@/views/repair/stockOperate/Components/SoInfo.vue";
|
|
||||||
import SoIndex from "@/views/repair/stockOperate/Components/SoIndex.vue";
|
|
||||||
import SoVoid from "@/views/repair/stockOperate/Components/SoVoid.vue";
|
|
||||||
import SoiTable from "@/views/repair/stockOperate/Components/SoiTable.vue";
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: "OutStock",
|
|
||||||
components: {
|
|
||||||
SoiTable,
|
|
||||||
SoVoid,
|
|
||||||
SoIndex,
|
|
||||||
SoInfo
|
|
||||||
},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
activeTab: 'receive',
|
|
||||||
soByType: true,
|
|
||||||
}
|
|
||||||
},
|
|
||||||
created() {
|
|
||||||
this.isType()
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
// 判断是什么单据,决定字段的属性、展示否等
|
|
||||||
async isType() {
|
|
||||||
const url = this.$route.path
|
|
||||||
this.soByType = url.includes("soi")
|
|
||||||
},
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style scoped lang="scss">
|
|
||||||
|
|
||||||
</style>
|
|
Loading…
Reference in New Issue
Block a user