23 changed files with 2342 additions and 359 deletions
@ -0,0 +1,424 @@ |
|||
<template> |
|||
<div class="app-container"> |
|||
<div v-show="viewState == 1"> |
|||
|
|||
<div class="tab-header webtop"> |
|||
<!-- 标题 --> |
|||
<div>【新增】维修出库</div> |
|||
<!-- start 添加修改按钮 --> |
|||
<div> |
|||
<el-button type="primary" size="small" @click="seleMaintenance">选择维修工单</el-button> |
|||
<el-button type="primary" size="small" :disabled="submitdisabled" @click="saveOrUpdate">出库</el-button> |
|||
<el-button type="info" size="small" @click="handleReturn()">清空</el-button> |
|||
</div> |
|||
<!-- end 添加修改按钮 --> |
|||
<!-- end 详情按钮 --> |
|||
</div> |
|||
|
|||
<div class="listconadd"> |
|||
|
|||
<el-form ref="form_obj" :model="formobj" :rules="rules" class="formaddcopy02"> |
|||
<!-- <div class="title"> |
|||
<div>基础信息</div> |
|||
</div> --> |
|||
<el-row class="first_row"> |
|||
|
|||
<el-col :span="8"> |
|||
<div class="span-sty"><span class="must">*</span> 操作人</div> |
|||
<el-form-item prop="goodsName"> |
|||
<span class="addinputw addinputInfo">{{formobj.goodsName}}</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
|
|||
<el-col :span="8"> |
|||
<div class="span-sty"><span class="must">*</span> 操作部门</div> |
|||
<el-form-item prop="goodsCode"> |
|||
<span class="addinputw addinputInfo">{{formobj.goodsName}}</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
|
|||
<el-col :span="8"> |
|||
<div class="span-sty">操作日期</div> |
|||
<el-form-item> |
|||
<el-form-item><span class="addinputw addinputInfo">{{ formobj.createTime }}</span></el-form-item> |
|||
</el-form-item> |
|||
</el-col> |
|||
|
|||
</el-row> |
|||
|
|||
<el-row> |
|||
|
|||
<el-col :span="8"> |
|||
<div class="span-sty"><span class="must">*</span> 领料人</div> |
|||
<el-form-item prop="upShelfName"> |
|||
<el-select v-model="formobj.upShelfName" filterable clearable placeholder="请选择" |
|||
class="addinputw addinputInfo" @change="receivePerSelect"> |
|||
<el-option v-for="item in receivePerList" :key="item.sid" :label="item.name" :value="item.sid"> |
|||
</el-option> |
|||
</el-select> |
|||
|
|||
</el-form-item> |
|||
</el-col> |
|||
|
|||
<el-col :span="16"> |
|||
<div class="span-sty">备注</div> |
|||
<el-form-item> |
|||
<el-input v-model="formobj.indexes" placeholder="备注" class="addinputw addinputInfo" clearable /> |
|||
</el-form-item> |
|||
</el-col> |
|||
|
|||
</el-row> |
|||
|
|||
<div class="title titleOne"> |
|||
<div>维修工单</div> |
|||
</div> |
|||
|
|||
<el-row> |
|||
<el-col :span="8"> |
|||
<div class="span-sty"><span class="must">*</span> 维修工单编号</div> |
|||
<el-form-item prop="goodsName"> |
|||
<span class="addinputw addinputInfo">{{formobj.goodsName}}</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
|
|||
<el-col :span="8"> |
|||
<div class="span-sty"><span class="must">*</span> 单据日期</div> |
|||
<el-form-item prop="goodsCode"> |
|||
<span class="addinputw addinputInfo">{{formobj.goodsName}}</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
|
|||
<el-col :span="8"> |
|||
<div class="span-sty">服务顾问</div> |
|||
<el-form-item> |
|||
<el-form-item><span class="addinputw addinputInfo">{{ formobj.createTime }}</span></el-form-item> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
|
|||
<el-row> |
|||
|
|||
<el-col :span="8"> |
|||
<div class="span-sty"><span class="must">*</span> 工单类型</div> |
|||
<el-form-item prop="goodsName"> |
|||
<span class="addinputw addinputInfo">{{formobj.goodsName}}</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
|
|||
<el-col :span="8"> |
|||
<div class="span-sty"><span class="must">*</span> 科目</div> |
|||
<el-form-item prop="goodsCode"> |
|||
<span class="addinputw addinputInfo">{{formobj.goodsName}}</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
|
|||
<el-col :span="8"> |
|||
<div class="span-sty"></div> |
|||
<el-form-item> |
|||
<el-form-item><span class="addinputw addinputInfo"></span></el-form-item> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
|
|||
<el-row> |
|||
|
|||
<el-col :span="8"> |
|||
<div class="span-sty"><span class="must">*</span> 客户名称</div> |
|||
<el-form-item prop="goodsName"> |
|||
<span class="addinputw addinputInfo">{{formobj.goodsName}}</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
|
|||
<el-col :span="8"> |
|||
<div class="span-sty"><span class="must">*</span> 车牌号/车架号</div> |
|||
<el-form-item prop="goodsCode"> |
|||
<span class="addinputw addinputInfo">{{formobj.goodsName}}</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
|
|||
<el-col :span="8"> |
|||
<div class="span-sty">客户单位</div> |
|||
<el-form-item> |
|||
<el-form-item><span class="addinputw addinputInfo">{{ formobj.createTime }}</span></el-form-item> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
|
|||
<div class="title titleOne"> |
|||
<div>服务项目</div> |
|||
</div> |
|||
<el-table v-loading="listLoading" :data="formobj.baseGoodsSkus" border> |
|||
<!-- <el-table-column type="selection" align="center" width="50"/> --> |
|||
<el-table-column label="序号" type="index" width="80" :index="indexMethod" align="center" /> |
|||
<el-table-column label="操作" wid align="center" width="80"> |
|||
<template slot-scope="scope"> |
|||
<el-button type="primary" size="mini" |
|||
@click="showGoodsSkuDttail(scope.row.baseGoodsSkuExtend)">商品出库</el-button> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="服务项目" prop="goodsSkuCode" align="center" /> |
|||
<el-table-column label="工种" prop="title" align="center" /> |
|||
<el-table-column label="科目" prop="externalCode" align="center" /> |
|||
<el-table-column label="维修人" prop="indexes" align="center" /> |
|||
<el-table-column label="考核工时" prop="ownSpec" align="center" /> |
|||
<el-table-column label="工时单价" prop="ownSpec" align="center" /> |
|||
<el-table-column label="工时数" prop="ownSpec" align="center" /> |
|||
<el-table-column label="销售价" prop="ownSpec" align="center" /> |
|||
<el-table-column label="折扣" prop="ownSpec" align="center" /> |
|||
<el-table-column label="优惠" prop="ownSpec" align="center" /> |
|||
<el-table-column label="金额" prop="ownSpec" align="center" /> |
|||
<el-table-column label="备注" prop="ownSpec" align="center" /> |
|||
</el-table> |
|||
|
|||
<div class="title titleOne"> |
|||
<div>商品列表</div> |
|||
</div> |
|||
<el-table v-loading="listLoading" :data="formobj.baseGoodsSkus" border> |
|||
<!-- <el-table-column type="selection" align="center" width="50"/> --> |
|||
<el-table-column label="序号" type="index" width="80" :index="indexMethod" align="center" /> |
|||
<el-table-column label="操作" wid align="center" width="80"> |
|||
<template slot-scope="scope"> |
|||
<el-button type="primary" size="mini" |
|||
@click="showGoodsSkuDttail(scope.row.baseGoodsSkuExtend)">删除</el-button> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="项目名称" prop="goodsSkuCode" align="center" /> |
|||
<el-table-column label="商品名称" prop="title" align="center" /> |
|||
<el-table-column label="商品编码" prop="externalCode" align="center" /> |
|||
<el-table-column label="规格" prop="indexes" align="center" /> |
|||
<el-table-column label="单位" prop="ownSpec" align="center" /> |
|||
<el-table-column label="仓库" prop="ownSpec" align="center" /> |
|||
<el-table-column label="库位" prop="ownSpec" align="center" /> |
|||
<el-table-column label="销售单价" prop="ownSpec" align="center" /> |
|||
<el-table-column label="已出数量" prop="ownSpec" align="center" /> |
|||
<el-table-column label="出库数量" align="center" width="120"> |
|||
<template slot-scope="scope"> |
|||
<el-input @input="commodityComputeYHAndXSJE(scope.row,$event)" v-model="scope.row.actualInCount" |
|||
clearable placeholder="" oninput="value=value.replace(/^(0+)|[^\d]+/g,'')" /> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="金额" prop="ownSpec" align="center" /> |
|||
<el-table-column label="备注" align="center" width="220"> |
|||
<template slot-scope="scope"> |
|||
<el-input v-model="scope.row.actualInCount" clearable placeholder="" /> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
|
|||
</el-form> |
|||
|
|||
</div> |
|||
</div> |
|||
|
|||
<!-- 选择维修单 --> |
|||
<chooseproducts v-show="viewState == 2" ref="divSp" @backData="backData" @doback="resetState" /> |
|||
|
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import req from '@/api/goods/goods.js' |
|||
import chooseproducts from './relation/chooseproducts' |
|||
import { |
|||
selAllByOrgSidPath |
|||
} from '@/api/Common/dictcommons' |
|||
|
|||
export default { |
|||
components: { |
|||
chooseproducts, |
|||
}, |
|||
data() { |
|||
return { |
|||
viewState: 1, |
|||
listLoading: false, |
|||
submitdisabled: false, |
|||
formobj: { |
|||
|
|||
}, |
|||
receivePerList: [], |
|||
rules: { |
|||
goodsName: [{ |
|||
required: true, |
|||
message: '商品名称不能为空', |
|||
trigger: 'blur' |
|||
}], |
|||
goodsCode: [{ |
|||
required: true, |
|||
message: '商品编码不能为空', |
|||
trigger: 'blur' |
|||
}], |
|||
goodsUnitName: [{ |
|||
required: true, |
|||
message: '请选择计量单位', |
|||
trigger: 'change' |
|||
}], |
|||
goodsTypeName: [{ |
|||
required: true, |
|||
message: '请选择商品类别', |
|||
trigger: 'change' |
|||
}], |
|||
brandName: [{ |
|||
required: true, |
|||
message: '请选择商品品牌', |
|||
trigger: 'change' |
|||
}], |
|||
manufacturerName: [{ |
|||
required: true, |
|||
message: '请选择商品厂家', |
|||
trigger: 'change' |
|||
}], |
|||
sortNo: [{ |
|||
required: true, |
|||
message: '商品排序不能为空', |
|||
trigger: 'blur' |
|||
}], |
|||
inventoryAlertUpperLimit: [{ |
|||
required: true, |
|||
message: '商品上限不能为空', |
|||
trigger: 'blur' |
|||
}], |
|||
inventoryAlertLowerLimitt: [{ |
|||
required: true, |
|||
message: '商品下限不能为空', |
|||
trigger: 'blur' |
|||
}], |
|||
} |
|||
} |
|||
}, |
|||
created() { |
|||
this.initData() |
|||
this.$nextTick(() => { |
|||
this.$refs['form_obj'].clearValidate() |
|||
}) |
|||
}, |
|||
methods: { |
|||
initData() { |
|||
selAllByOrgSidPath({ |
|||
orgSidPath: window.sessionStorage.getItem('defaultOrgPath') |
|||
}).then((res) => { |
|||
if (res.success) { |
|||
this.receivePerList = res.data |
|||
|
|||
console.log("aaaaaa", this.receivePerList); |
|||
|
|||
} |
|||
}) |
|||
}, |
|||
backData(value) { |
|||
this.viewState = 1 |
|||
if (value.length > 0) { |
|||
value.forEach((e) => { |
|||
|
|||
this.formobj.detailsList.push({ |
|||
goodSpuSid: e.goodsSpuSid, |
|||
goodsSpuName: e.goodsSpuName, |
|||
goodsSkuSid: e.goodsSkuSid, |
|||
goodsSkuTitle: e.goodsSkuTitle, |
|||
goodsSkuCode: e.goodsSkuCode, |
|||
goodsSkuOwnSpec: e.goodsSkuOwnSpec, |
|||
unit: e.unit, |
|||
warehouseSid: e.warehouseSid, |
|||
warehouseName: e.warehouseName, |
|||
warehouseRackSid: e.warehouseRackSid, |
|||
warehouseRackCode: e.warehouseRackCode, |
|||
money: e.money, |
|||
moneyAll: '', |
|||
outCount: '', |
|||
inventorySid: e.inventorySid, // 库存商品sid |
|||
}) |
|||
}) |
|||
} |
|||
}, |
|||
resetState() { |
|||
this.viewState = 1 |
|||
}, |
|||
seleMaintenance() { |
|||
this.viewState = 2 |
|||
const aa = [] |
|||
this.$refs['divSp'].showData(aa, this.formobj.createOrgSid) |
|||
}, |
|||
|
|||
saveOrUpdate() { |
|||
console.log('>>>>>>>>>saveOrUpdate', this.formobj) |
|||
this.$refs['form_obj'].validate((valid) => { |
|||
if (valid) { |
|||
|
|||
req.saveGoods(this.formobj) |
|||
.then(resp => { |
|||
if (resp.success) { |
|||
this.$message({ |
|||
showClose: true, |
|||
type: 'success', |
|||
message: resp.msg |
|||
}) |
|||
this.handleReturn('true') |
|||
} else { |
|||
// 根据resp.code进行异常情况处理 |
|||
} |
|||
}) |
|||
.catch(() => {}) |
|||
|
|||
} |
|||
}) |
|||
}, |
|||
handleReturn(isreload) { |
|||
this.$nextTick(() => { |
|||
this.$refs['form_obj'].clearValidate() |
|||
}) |
|||
this.formobj = { |
|||
|
|||
} |
|||
}, |
|||
indexMethod(index) { |
|||
return index + 1 |
|||
}, |
|||
receivePerSelect(val) { |
|||
const choose = this.receivePerList.filter((item) => item.sid == val) |
|||
console.log('>>>>>>>>>receivePerSelect', choose) |
|||
this.formobj.manufacturerSid = choose[0].sid |
|||
this.formobj.manufacturerName = choose[0].manufacturerName |
|||
}, |
|||
|
|||
} |
|||
} |
|||
</script> |
|||
<style scoped> |
|||
/deep/ .el-form-item__error { |
|||
margin-left: 120px !important; |
|||
} |
|||
|
|||
.must { |
|||
color: #f00; |
|||
} |
|||
|
|||
.span-sty { |
|||
width: 130px !important; |
|||
} |
|||
|
|||
.addinputInfo { |
|||
margin-left: 120px !important; |
|||
} |
|||
|
|||
.formaddcopy02 .el-row .el-col /deep/ .el-form-item .addinputw { |
|||
margin-left: 120px !important; |
|||
width: calc(100% - 115px); |
|||
} |
|||
|
|||
.first_row { |
|||
border-top: 1px solid #E0E3EB; |
|||
} |
|||
|
|||
.titleOne { |
|||
padding: 7px; |
|||
display: flex; |
|||
flex-direction: row; |
|||
justify-content: space-between; |
|||
align-items: center; |
|||
} |
|||
|
|||
.el-radio /deep/ .el-radio__label { |
|||
|
|||
font-size: 14px !important; |
|||
|
|||
} |
|||
</style> |
@ -0,0 +1,204 @@ |
|||
<template> |
|||
<div class="app-container"> |
|||
<div> |
|||
<div class="tab-header webtop"> |
|||
<div>选择维修工单</div> |
|||
<div> |
|||
<!-- <el-button type="primary" size="small" @click="AddUpdateReturn">确定</el-button> --> |
|||
<el-button type="info" size="small" @click="handleReturn()">关闭</el-button> |
|||
</div> |
|||
</div> |
|||
<div class=""> |
|||
<div class="searchcon"> |
|||
<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="120px" class="tab-header"> |
|||
<el-form-item label="工单编号" class="searchlist"> |
|||
<el-input v-model="listQuery.params.billNo" placeholder="" clearable /> |
|||
</el-form-item> |
|||
<el-form-item label="客户名称" class="searchlist"> |
|||
<el-input v-model="listQuery.params.customerName" placeholder="" clearable /> |
|||
</el-form-item> |
|||
<el-form-item label="车牌号" class="searchlist"> |
|||
<el-input v-model="listQuery.params.vehMark" placeholder="" clearable /> |
|||
</el-form-item> |
|||
<el-form-item label="进厂日期"> |
|||
<el-date-picker v-model="listQuery.params.entryStartTime" type="date" placeholder="选择日期" |
|||
format="yyyy-MM-dd" value-format="yyyy-MM-dd" style="width: 200px;"> |
|||
</el-date-picker>至 |
|||
<el-date-picker v-model="listQuery.params.entryEndTime" type="date" placeholder="选择日期" |
|||
format="yyyy-MM-dd" value-format="yyyy-MM-dd" style="width: 200px;"> |
|||
</el-date-picker> |
|||
</el-form-item> |
|||
</el-form> |
|||
<div class="btn" style="text-align: center;"> |
|||
<el-button type="primary" icon="el-icon-search" @click="handleFilter" size="small">查询</el-button> |
|||
<el-button type="primary" icon="el-icon-refresh" @click="handleReset" size="small">重置</el-button> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="listtop"> |
|||
<div class="tit">维修工单列表</div> |
|||
<!-- <pageye v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current" :limit.sync="listQuery.size" class="pagination" @pagination="getList"/>--> |
|||
</div> |
|||
<div class=""> |
|||
<el-table :key="tableKey" ref="multipleTable" v-loading="listLoading" :data="list" border style="width: 100%"> |
|||
<!-- @selection-change="handleSelectionChange"> --> |
|||
<!-- <el-table-column width="50px" type="selection" align="center"/> --> |
|||
<el-table-column width="80px" label="序号" type="index" :index="indexMethod" align="center" /> |
|||
<el-table-column fixed label="操作" width="100" align="center"> |
|||
<template slot-scope="scope"> |
|||
<el-button type="primary" size="mini" @click="toInfo(scope.row)">确认</el-button> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="billNo" label="工单编号" align="center" /> |
|||
<el-table-column prop="billType" label="工单类型" align="center" /> |
|||
<el-table-column prop="customerName" label="客户名称" align="center" /> |
|||
<el-table-column prop="mobile" label="联系电话" align="center" /> |
|||
<el-table-column prop="vinNo" label="车架号" align="center" /> |
|||
<el-table-column prop="vehMark" label="车牌号" align="center" /> |
|||
<el-table-column prop="entryTime" label="进厂日期" align="center" /> |
|||
</el-table> |
|||
</div> |
|||
<div class="pages"> |
|||
<div class="tit" /> |
|||
<!-- 翻页 --> |
|||
<Pagination v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current" |
|||
:limit.sync="listQuery.size" class="pagination" @pagination="getList" /> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import Pagination from '@/components/pagination' |
|||
import { |
|||
getAsBusrepairBill |
|||
} from '@/api/Common/dictcommons' |
|||
|
|||
export default { |
|||
name: 'SelectVehicle', |
|||
components: { |
|||
Pagination |
|||
}, |
|||
data() { |
|||
return { |
|||
isSearchShow: false, |
|||
searchxianshitit: '隐藏查询条件', |
|||
tableKey: 0, |
|||
sids: [], |
|||
list: [], |
|||
number: '', |
|||
listLoading: false, |
|||
listQuery: { |
|||
current: 1, |
|||
size: 10, |
|||
params: { |
|||
nodeCode: 3, |
|||
billNo: '', |
|||
customerName: '', |
|||
vehMark: '', |
|||
entryStartTime: '', |
|||
entryEndTime: '' |
|||
}, |
|||
total: 0 |
|||
} |
|||
} |
|||
}, |
|||
methods: { |
|||
// 搜索条件效果 |
|||
clicksearchShow() { |
|||
this.isSearchShow = !this.isSearchShow |
|||
if (this.isSearchShow) { |
|||
this.searchxianshitit = '隐藏查询条件' |
|||
} else { |
|||
this.searchxianshitit = '显示查询条件' |
|||
} |
|||
}, |
|||
indexMethod(index) { |
|||
var pagestart = (this.listQuery.current - 1) * this.listQuery.size |
|||
var pageindex = index + 1 + pagestart |
|||
return pageindex |
|||
}, |
|||
// 查询列表信息 |
|||
getList() { |
|||
this.listLoading = true |
|||
this.listQuery.params.userSid = window.sessionStorage.getItem('userSid') |
|||
this.listQuery.params.orgPath = window.sessionStorage.getItem('defaultOrgPath') |
|||
this.listQuery.params.menuUrl = this.$route.path |
|||
getAsBusrepairBill(this.listQuery).then((response) => { |
|||
this.listLoading = false |
|||
if (response.success) { |
|||
this.listQuery.total = response.data.total |
|||
this.list = response.data.records |
|||
} |
|||
}) |
|||
}, |
|||
// 查询按钮 |
|||
handleFilter() { |
|||
this.listQuery.current = 1 |
|||
this.getList() |
|||
}, |
|||
// 重置按钮 |
|||
handleReset() { |
|||
this.listQuery = { |
|||
current: 1, |
|||
size: 10, |
|||
params: { |
|||
nodeCode: 3, |
|||
billNo: '', |
|||
customerName: '', |
|||
vehMark: '', |
|||
entryStartTime: '', |
|||
entryEndTime: '' |
|||
}, |
|||
total: 0 |
|||
} |
|||
this.getList() |
|||
}, |
|||
handleSelectionChange(row) { |
|||
this.sids = row |
|||
}, |
|||
showData(value, createOrgSid) { |
|||
// const aa = [] |
|||
// if (value.length > 0) { |
|||
// for (var i = 0; i < value.length; i++) { |
|||
// aa.push(value[i].saleVehSid) |
|||
// } |
|||
// this.listQuery.params.saleVehSids = aa |
|||
// } else { |
|||
// this.listQuery.params.saleVehSids = [] |
|||
// }`` |
|||
this.listQuery.params.createOrgSid = createOrgSid |
|||
this.listQuery.current = 1 |
|||
this.listQuery.size = 10 |
|||
this.listQuery.total = 0 |
|||
this.getList() |
|||
}, |
|||
// 添加修改返回 |
|||
AddUpdateReturn() { |
|||
if (this.sids.length > 0) { |
|||
this.$emit('backData', this.sids) |
|||
} else { |
|||
this.$notify({ |
|||
title: '提示', |
|||
message: '请至少选择一条记录进行操作', |
|||
type: 'error', |
|||
duration: 2000 |
|||
}) |
|||
} |
|||
}, |
|||
|
|||
toInfo(){ |
|||
this.$emit('backData', this.sids[0].sid) |
|||
}, |
|||
// 返回 |
|||
handleReturn() { |
|||
this.$emit('doback') |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
<style scoped> |
|||
</style> |
@ -0,0 +1,523 @@ |
|||
<template> |
|||
<div> |
|||
|
|||
<div class="tab-header webtop"> |
|||
<!-- 标题 --> |
|||
<div>【新增】维修出库</div> |
|||
<!-- start 添加修改按钮 --> |
|||
<div> |
|||
<el-button type="primary" size="small" @click="seleMaintenance">选择维修工单</el-button> |
|||
<el-button type="primary" size="small" :disabled="submitdisabled" @click="saveOrUpdate">出库</el-button> |
|||
<el-button type="info" size="small" @click="handleReturn()">关闭</el-button> |
|||
</div> |
|||
<!-- end 添加修改按钮 --> |
|||
<!-- end 详情按钮 --> |
|||
</div> |
|||
|
|||
<div class="listconadd"> |
|||
|
|||
<el-form ref="form_obj" :model="formobj" :rules="rules" class="formaddcopy02"> |
|||
<!-- <div class="title"> |
|||
<div>基础信息</div> |
|||
</div> --> |
|||
<el-row class="first_row"> |
|||
|
|||
<el-col :span="8"> |
|||
<div class="span-sty"><span class="must">*</span> 操作人</div> |
|||
<el-form-item prop="goodsName"> |
|||
<span class="addinputw addinputInfo">{{formobj.goodsName}}</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
|
|||
<el-col :span="8"> |
|||
<div class="span-sty"><span class="must">*</span> 操作部门</div> |
|||
<el-form-item prop="goodsCode"> |
|||
<span class="addinputw addinputInfo">{{formobj.goodsName}}</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
|
|||
<el-col :span="8"> |
|||
<div class="span-sty">操作日期</div> |
|||
<el-form-item> |
|||
<el-form-item><span class="addinputw addinputInfo">{{ formobj.createTime }}</span></el-form-item> |
|||
</el-form-item> |
|||
</el-col> |
|||
|
|||
</el-row> |
|||
|
|||
<el-row> |
|||
|
|||
<el-col :span="8"> |
|||
<div class="span-sty"><span class="must">*</span> 领料人</div> |
|||
<el-form-item prop="goodsUnitName"> |
|||
<el-select v-model="formobj.goodsUnitName" placeholder="请选择领料人" class="addinputw" |
|||
@change="selectunitNameChange"> |
|||
<el-option v-for="item in unitNameList" :key="item.sid" :label="item.unitName" :value="item.sid" /> |
|||
</el-select> |
|||
</el-form-item> |
|||
</el-col> |
|||
|
|||
<el-col :span="16"> |
|||
<div class="span-sty">备注</div> |
|||
<el-form-item> |
|||
<el-input v-model="formobj.indexes" placeholder="备注" class="addinputw addinputInfo" clearable /> |
|||
</el-form-item> |
|||
</el-col> |
|||
|
|||
</el-row> |
|||
|
|||
<div class="title titleOne"> |
|||
<div>维修工单</div> |
|||
</div> |
|||
|
|||
<el-row> |
|||
<el-col :span="8"> |
|||
<div class="span-sty"><span class="must">*</span> 维修工单编号</div> |
|||
<el-form-item prop="goodsName"> |
|||
<span class="addinputw addinputInfo">{{formobj.goodsName}}</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
|
|||
<el-col :span="8"> |
|||
<div class="span-sty"><span class="must">*</span> 单据日期</div> |
|||
<el-form-item prop="goodsCode"> |
|||
<span class="addinputw addinputInfo">{{formobj.goodsName}}</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
|
|||
<el-col :span="8"> |
|||
<div class="span-sty">服务顾问</div> |
|||
<el-form-item> |
|||
<el-form-item><span class="addinputw addinputInfo">{{ formobj.createTime }}</span></el-form-item> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
|
|||
<el-row> |
|||
|
|||
<el-col :span="8"> |
|||
<div class="span-sty"><span class="must">*</span> 工单类型</div> |
|||
<el-form-item prop="goodsName"> |
|||
<span class="addinputw addinputInfo">{{formobj.goodsName}}</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
|
|||
<el-col :span="8"> |
|||
<div class="span-sty"><span class="must">*</span> 科目</div> |
|||
<el-form-item prop="goodsCode"> |
|||
<span class="addinputw addinputInfo">{{formobj.goodsName}}</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
|
|||
<el-col :span="8"> |
|||
<div class="span-sty"></div> |
|||
<el-form-item> |
|||
<el-form-item><span class="addinputw addinputInfo"></span></el-form-item> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
|
|||
<el-row> |
|||
|
|||
<el-col :span="8"> |
|||
<div class="span-sty"><span class="must">*</span> 客户名称</div> |
|||
<el-form-item prop="goodsName"> |
|||
<span class="addinputw addinputInfo">{{formobj.goodsName}}</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
|
|||
<el-col :span="8"> |
|||
<div class="span-sty"><span class="must">*</span> 车牌号/车架号</div> |
|||
<el-form-item prop="goodsCode"> |
|||
<span class="addinputw addinputInfo">{{formobj.goodsName}}</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
|
|||
<el-col :span="8"> |
|||
<div class="span-sty">客户单位</div> |
|||
<el-form-item> |
|||
<el-form-item><span class="addinputw addinputInfo">{{ formobj.createTime }}</span></el-form-item> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
|
|||
<div class="title titleOne"> |
|||
<div>服务项目</div> |
|||
</div> |
|||
<el-table v-loading="listLoading" :data="formobj.baseGoodsSkus" border> |
|||
<!-- <el-table-column type="selection" align="center" width="50"/> --> |
|||
<el-table-column label="序号" type="index" width="80" :index="indexMethod" align="center" /> |
|||
<el-table-column label="操作" wid align="center" width="80"> |
|||
<template slot-scope="scope"> |
|||
<el-button type="primary" size="mini" |
|||
@click="showGoodsSkuDttail(scope.row.baseGoodsSkuExtend)">商品出库</el-button> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="服务项目" prop="goodsSkuCode" align="center" /> |
|||
<el-table-column label="工种" prop="title" align="center" /> |
|||
<el-table-column label="科目" prop="externalCode" align="center" /> |
|||
<el-table-column label="维修人" prop="indexes" align="center" /> |
|||
<el-table-column label="考核工时" prop="ownSpec" align="center" /> |
|||
<el-table-column label="工时单价" prop="ownSpec" align="center" /> |
|||
<el-table-column label="工时数" prop="ownSpec" align="center" /> |
|||
<el-table-column label="销售价" prop="ownSpec" align="center" /> |
|||
<el-table-column label="折扣" prop="ownSpec" align="center" /> |
|||
<el-table-column label="优惠" prop="ownSpec" align="center" /> |
|||
<el-table-column label="金额" prop="ownSpec" align="center" /> |
|||
<el-table-column label="备注" prop="ownSpec" align="center" /> |
|||
</el-table> |
|||
|
|||
<div class="title titleOne"> |
|||
<div>商品列表</div> |
|||
<el-button type="primary" size="mini" class="btntopblueline" @click="batchAddAll()">全退</el-button> |
|||
</div> |
|||
<el-table v-loading="listLoading" :data="formobj.baseGoodsSkus" border> |
|||
<!-- <el-table-column type="selection" align="center" width="50"/> --> |
|||
<el-table-column label="序号" type="index" width="80" :index="indexMethod" align="center" /> |
|||
<el-table-column label="操作" wid align="center" width="80"> |
|||
<template slot-scope="scope"> |
|||
<el-button type="primary" size="mini" |
|||
@click="showGoodsSkuDttail(scope.row.baseGoodsSkuExtend)">删除</el-button> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="项目名称" prop="goodsSkuCode" align="center" /> |
|||
<el-table-column label="商品名称" prop="title" align="center" /> |
|||
<el-table-column label="商品编码" prop="externalCode" align="center" /> |
|||
<el-table-column label="规格" prop="indexes" align="center" /> |
|||
<el-table-column label="单位" prop="ownSpec" align="center" /> |
|||
<el-table-column label="仓库" prop="ownSpec" align="center" /> |
|||
<el-table-column label="库位" prop="ownSpec" align="center" /> |
|||
<el-table-column label="销售单价" prop="ownSpec" align="center" /> |
|||
<el-table-column label="已出数量" prop="ownSpec" align="center" /> |
|||
<el-table-column label="退库数量" align="center" width="120"> |
|||
<template slot-scope="scope"> |
|||
<el-input @input="commodityComputeYHAndXSJE(scope.row,$event)" |
|||
v-model="scope.row.actualInCount" clearable placeholder="" |
|||
oninput="value=value.replace(/^(0+)|[^\d]+/g,'')" /> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="销售单价" prop="ownSpec" align="center" /> |
|||
<el-table-column label="备注" align="center" width="220"> |
|||
<template slot-scope="scope"> |
|||
<el-input v-model="scope.row.actualInCount" clearable placeholder="" /> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
|
|||
|
|||
</el-form> |
|||
|
|||
</div> |
|||
|
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import req from '@/api/goods/goods.js' |
|||
import req2 from '@/api/goods/brand.js' |
|||
import req3 from '@/api/goods/category.js' |
|||
import req4 from '@/api/goods/factory.js' |
|||
import req5 from '@/api/goods/unit.js' |
|||
import uploadImg from '@/components/uploadFile/uploadImg' |
|||
export default { |
|||
components: { |
|||
uploadImg |
|||
}, |
|||
data() { |
|||
return { |
|||
listLoading: false, |
|||
activeNames: ['1'], |
|||
imgList: [], |
|||
submitdisabled: false, |
|||
formobj: { |
|||
"sid": "", |
|||
"userSid": window.sessionStorage.getItem('userSid'), |
|||
"orgPath": window.sessionStorage.getItem('orgSidPath'), |
|||
"goodsName": "", |
|||
"goodsCode": "", |
|||
"goodsPY": "", |
|||
"barCode": "", |
|||
"goodsUnitSid": "", |
|||
"goodsUnitName": "", |
|||
"goodsTypeSid": "", |
|||
"goodsTypeName": "", |
|||
"indexes": "", |
|||
"shelfLife": "", |
|||
"brandSid": "", |
|||
"brandName": "", |
|||
"manufacturerSid": "", |
|||
"manufacturerName": "", |
|||
"isOriginalFactory": "2", |
|||
"isOriginalFactoryValue": "", |
|||
"sortNo": "", |
|||
"skuRemarks": "", |
|||
"inventoryAlertUpperLimit": "", |
|||
"inventoryAlertLowerLimit": "", |
|||
"isLockingSalesPrice": "2", |
|||
"isLockingSalesPriceValue": "", |
|||
"minimumSalesPrice": "", |
|||
"standardPurchasePrice": "", |
|||
"agencyPrice": "", |
|||
"picPath": [] |
|||
}, |
|||
brandList: [], |
|||
cateList: [], |
|||
facturerList: [], |
|||
unitNameList: [], |
|||
rules: { |
|||
goodsName: [{ |
|||
required: true, |
|||
message: '商品名称不能为空', |
|||
trigger: 'blur' |
|||
}], |
|||
goodsCode: [{ |
|||
required: true, |
|||
message: '商品编码不能为空', |
|||
trigger: 'blur' |
|||
}], |
|||
goodsUnitName: [{ |
|||
required: true, |
|||
message: '请选择计量单位', |
|||
trigger: 'change' |
|||
}], |
|||
goodsTypeName: [{ |
|||
required: true, |
|||
message: '请选择商品类别', |
|||
trigger: 'change' |
|||
}], |
|||
brandName: [{ |
|||
required: true, |
|||
message: '请选择商品品牌', |
|||
trigger: 'change' |
|||
}], |
|||
manufacturerName: [{ |
|||
required: true, |
|||
message: '请选择商品厂家', |
|||
trigger: 'change' |
|||
}], |
|||
sortNo: [{ |
|||
required: true, |
|||
message: '商品排序不能为空', |
|||
trigger: 'blur' |
|||
}], |
|||
inventoryAlertUpperLimit: [{ |
|||
required: true, |
|||
message: '商品上限不能为空', |
|||
trigger: 'blur' |
|||
}], |
|||
inventoryAlertLowerLimitt: [{ |
|||
required: true, |
|||
message: '商品下限不能为空', |
|||
trigger: 'blur' |
|||
}], |
|||
} |
|||
} |
|||
}, |
|||
created() { |
|||
this.initData() |
|||
}, |
|||
methods: { |
|||
|
|||
selectIsOriginalFactory(val) { |
|||
console.log('selectIsOriginalFactory》》》》', val) |
|||
|
|||
this.formobj.isOriginalFactoryValue = val == '1' ? '是' : '否' |
|||
|
|||
}, |
|||
selectIsLockingSalesPrice(val) { |
|||
console.log('selectIsLockingSalesPrice》》》》', val) |
|||
|
|||
this.formobj.isLockingSalesPriceValue = val == '1' ? '是' : '否' |
|||
|
|||
}, |
|||
initData() { |
|||
var parpams = { |
|||
orgPath: window.sessionStorage.getItem('defaultOrgPath'), |
|||
userSid: window.sessionStorage.getItem('userSid'), |
|||
menuUrl: this.$route.path |
|||
} |
|||
req2.getAllBrand(parpams).then(resp => { |
|||
this.brandList = resp.data |
|||
}) |
|||
req3.getAllType(parpams).then(resp => { |
|||
this.cateList = resp.data |
|||
}) |
|||
req4.getAllFacturer(parpams).then(resp => { |
|||
this.facturerList = resp.data |
|||
}) |
|||
req5.getAllUnit(parpams).then(resp => { |
|||
this.unitNameList = resp.data |
|||
}) |
|||
}, |
|||
backData(value) { |
|||
console.log('backData》》》》', value) |
|||
console.log('imgList', this.imgList) |
|||
|
|||
this.formobj.picPath = this.imgList |
|||
|
|||
}, |
|||
|
|||
saveOrUpdate() { |
|||
console.log('>>>>>>>>>saveOrUpdate', this.formobj) |
|||
this.$refs['form_obj'].validate((valid) => { |
|||
if (valid) { |
|||
|
|||
req.saveGoods(this.formobj) |
|||
.then(resp => { |
|||
if (resp.success) { |
|||
this.$message({ |
|||
showClose: true, |
|||
type: 'success', |
|||
message: resp.msg |
|||
}) |
|||
this.handleReturn('true') |
|||
} else { |
|||
// 根据resp.code进行异常情况处理 |
|||
} |
|||
}) |
|||
.catch(() => {}) |
|||
|
|||
} |
|||
}) |
|||
}, |
|||
handleReturn(isreload) { |
|||
if (isreload === 'true') this.$emit('reloadlist') |
|||
this.formobj = { |
|||
"sid": "", |
|||
"userSid": window.sessionStorage.getItem('userSid'), |
|||
"orgPath": window.sessionStorage.getItem('orgSidPath'), |
|||
"goodsName": "", |
|||
"goodsCode": "", |
|||
"goodsPY": "", |
|||
"barCode": "", |
|||
"goodsUnitSid": "", |
|||
"goodsUnitName": "", |
|||
"goodsTypeSid": "", |
|||
"goodsTypeName": "", |
|||
"indexes": "", |
|||
"shelfLife": "", |
|||
"brandSid": "", |
|||
"brandName": "", |
|||
"manufacturerSid": "", |
|||
"manufacturerName": "", |
|||
"isOriginalFactory": "2", |
|||
"isOriginalFactoryValue": "", |
|||
"sortNo": "", |
|||
"skuRemarks": "", |
|||
"inventoryAlertUpperLimit": "", |
|||
"inventoryAlertLowerLimit": "", |
|||
"isLockingSalesPrice": "2", |
|||
"isLockingSalesPriceValue": "", |
|||
"minimumSalesPrice": "", |
|||
"standardPurchasePrice": "", |
|||
"agencyPrice": "", |
|||
"picPath": [] |
|||
} |
|||
this.imgList = [] |
|||
this.$emit('doback') |
|||
}, |
|||
showAdd() { |
|||
// var sid = require('uuid').v1() |
|||
// console.log('>>>>>>>>>showAdd', sid) |
|||
|
|||
// this.formobj.sid = sid |
|||
|
|||
this.$nextTick(() => { |
|||
this.$refs['form_obj'].clearValidate() |
|||
}) |
|||
|
|||
}, |
|||
indexMethod(index) { |
|||
return index + 1 |
|||
}, |
|||
showEdit(row) { |
|||
|
|||
this.$nextTick(() => { |
|||
this.$refs['form_obj'].clearValidate() |
|||
}) |
|||
|
|||
req.initGoods(row.sid) |
|||
.then(resp => { |
|||
if (resp.success) { |
|||
this.formobj = resp.data |
|||
|
|||
for (var i = 0; i < resp.data.picPath.length; i++) { |
|||
var item = resp.data.picPath[i] |
|||
this.imgList.push({ |
|||
url: item.url |
|||
}) |
|||
} |
|||
} |
|||
}) |
|||
.catch(e => { |
|||
this.formobj = row |
|||
}) |
|||
}, |
|||
selectBrandChange(val) { |
|||
const choose = this.brandList.filter((item) => item.sid == val) |
|||
console.log('>>>>>>>>>selectBrandChange', choose) |
|||
this.formobj.brandSid = choose[0].sid |
|||
this.formobj.brandName = choose[0].brandName |
|||
}, |
|||
selectCateChange(val) { |
|||
const choose = this.cateList.filter((item) => item.sid == val) |
|||
console.log('>>>>>>>>>selectCateChange', choose) |
|||
this.formobj.goodsTypeSid = choose[0].sid |
|||
this.formobj.goodsTypeName = choose[0].goodsTypeName |
|||
}, |
|||
selectfacturerChange(val) { |
|||
const choose = this.facturerList.filter((item) => item.sid == val) |
|||
console.log('>>>>>>>>>selectfacturerChange', choose) |
|||
this.formobj.manufacturerSid = choose[0].sid |
|||
this.formobj.manufacturerName = choose[0].manufacturerName |
|||
}, |
|||
selectunitNameChange(val) { |
|||
const choose = this.unitNameList.filter((item) => item.sid == val) |
|||
console.log('>>>>>>>>>selectunitNameChange', choose) |
|||
this.formobj.goodsUnitSid = choose[0].sid |
|||
this.formobj.goodsUnitName = choose[0].unitName |
|||
}, |
|||
|
|||
} |
|||
} |
|||
</script> |
|||
<style scoped> |
|||
/deep/ .el-form-item__error { |
|||
margin-left: 120px !important; |
|||
} |
|||
|
|||
.must { |
|||
color: #f00; |
|||
} |
|||
|
|||
.span-sty { |
|||
width: 130px !important; |
|||
} |
|||
|
|||
.addinputInfo { |
|||
margin-left: 120px !important; |
|||
} |
|||
|
|||
.formaddcopy02 .el-row .el-col /deep/ .el-form-item .addinputw { |
|||
margin-left: 120px !important; |
|||
width: calc(100% - 115px); |
|||
} |
|||
|
|||
.first_row { |
|||
border-top: 1px solid #E0E3EB; |
|||
} |
|||
|
|||
.titleOne { |
|||
padding: 7px; |
|||
display: flex; |
|||
flex-direction: row; |
|||
justify-content: space-between; |
|||
align-items: center; |
|||
} |
|||
|
|||
.el-radio /deep/ .el-radio__label { |
|||
|
|||
font-size: 14px !important; |
|||
|
|||
} |
|||
</style> |
@ -0,0 +1,164 @@ |
|||
<template> |
|||
<div class="app-container"> |
|||
<div> |
|||
<div class="tab-header webtop"> |
|||
<div>选择商品</div> |
|||
<div> |
|||
<el-button type="primary" size="small" @click="AddUpdateReturn">确定</el-button> |
|||
<el-button type="info" size="small" @click="handleReturn()">关闭</el-button> |
|||
</div> |
|||
</div> |
|||
<div class=""> |
|||
<div class="searchcon"> |
|||
<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="120px" class="tab-header"> |
|||
<el-form-item label="商品名称" class="searchlist"> |
|||
<el-input v-model="listQuery.params.goodsSpuName" placeholder="" clearable/> |
|||
</el-form-item> |
|||
<el-form-item label="商品编码" class="searchlist"> |
|||
<el-input v-model="listQuery.params.goodsSkuCode" placeholder="" clearable/> |
|||
</el-form-item> |
|||
<el-form-item label="供应商" class="searchlist"> |
|||
<el-input v-model="listQuery.params.manufacturerName" placeholder="" clearable /> |
|||
</el-form-item> |
|||
</el-form> |
|||
<div class="btn" style="text-align: center;"> |
|||
<el-button type="primary" icon="el-icon-search" @click="handleFilter" size="small">查询</el-button> |
|||
<el-button type="primary" icon="el-icon-refresh" @click="handleReset" size="small">重置</el-button> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="listtop"> |
|||
<div class="tit">商品列表</div> |
|||
<!-- <pageye v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current" :limit.sync="listQuery.size" class="pagination" @pagination="getList"/>--> |
|||
</div> |
|||
<div class=""> |
|||
<el-table :key="tableKey" ref="multipleTable" v-loading="listLoading" :data="list" border style="width: 100%" @selection-change="handleSelectionChange"> |
|||
<el-table-column width="50px" type="selection" align="center"/> |
|||
<el-table-column width="80px" label="序号" type="index" :index="indexMethod" align="center"/> |
|||
<el-table-column prop="goodsSpuName" label="商品名称" align="center" /> |
|||
<el-table-column prop="goodsSkuCode" label="商品编码" align="center" /> |
|||
<el-table-column prop="indexes" label="规格" align="center" /> |
|||
<el-table-column prop="goodsUnitName" label="单位" align="center" /> |
|||
<el-table-column prop="manufacturerName" label="供应商" align="center" /> |
|||
</el-table> |
|||
</div> |
|||
<div class="pages"> |
|||
<div class="tit"/> |
|||
<!-- 翻页 --> |
|||
<Pagination v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current" :limit.sync="listQuery.size" class="pagination" @pagination="getList"/> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import Pagination from '@/components/pagination' |
|||
import { getInventoryList } from '@/api/Common/dictcommons' |
|||
|
|||
export default { |
|||
name: 'SelectVehicle', |
|||
components: { |
|||
Pagination |
|||
}, |
|||
data() { |
|||
return { |
|||
isSearchShow: false, |
|||
searchxianshitit: '隐藏查询条件', |
|||
tableKey: 0, |
|||
sids: [], |
|||
list: [], |
|||
number: '', |
|||
listLoading: false, |
|||
listQuery: { |
|||
current: 1, |
|||
size: 5, |
|||
params: { |
|||
createOrgSid: '', |
|||
goodsSpuName: '', |
|||
goodsSkuCode: '', |
|||
manufacturerName: '' |
|||
}, |
|||
total: 0 |
|||
} |
|||
} |
|||
}, |
|||
methods: { |
|||
// 搜索条件效果 |
|||
clicksearchShow() { |
|||
this.isSearchShow = !this.isSearchShow |
|||
if (this.isSearchShow) { |
|||
this.searchxianshitit = '隐藏查询条件' |
|||
} else { |
|||
this.searchxianshitit = '显示查询条件' |
|||
} |
|||
}, |
|||
indexMethod(index) { |
|||
var pagestart = (this.listQuery.current - 1) * this.listQuery.size |
|||
var pageindex = index + 1 + pagestart |
|||
return pageindex |
|||
}, |
|||
// 查询列表信息 |
|||
getList() { |
|||
this.listLoading = true |
|||
getInventoryList(this.listQuery).then((response) => { |
|||
this.listLoading = false |
|||
if (response.success) { |
|||
this.listQuery.total = response.data.total |
|||
this.list = response.data.records |
|||
} |
|||
}) |
|||
}, |
|||
// 查询按钮 |
|||
handleFilter() { |
|||
this.listQuery.current = 1 |
|||
this.getList() |
|||
}, |
|||
// 重置按钮 |
|||
handleReset() { |
|||
this.listQuery.current = 1 |
|||
this.listQuery.size = 5 |
|||
this.listQuery.total = 0 |
|||
this.listQuery.params.goodsSpuName = '' |
|||
this.listQuery.params.goodsSkuCode = '' |
|||
this.listQuery.params.manufacturerName = '' |
|||
this.getList() |
|||
}, |
|||
handleSelectionChange(row) { |
|||
this.sids = row |
|||
}, |
|||
showData(value, createOrgSid) { |
|||
// const aa = [] |
|||
// if (value.length > 0) { |
|||
// for (var i = 0; i < value.length; i++) { |
|||
// aa.push(value[i].saleVehSid) |
|||
// } |
|||
// this.listQuery.params.saleVehSids = aa |
|||
// } else { |
|||
// this.listQuery.params.saleVehSids = [] |
|||
// }`` |
|||
this.listQuery.params.createOrgSid = createOrgSid |
|||
this.listQuery.current = 1 |
|||
this.listQuery.size = 5 |
|||
this.listQuery.total = 0 |
|||
this.getList() |
|||
}, |
|||
// 添加修改返回 |
|||
AddUpdateReturn() { |
|||
if (this.sids.length > 0) { |
|||
this.$emit('backData', this.sids) |
|||
} else { |
|||
this.$notify({ title: '提示', message: '请至少选择一条记录进行操作', type: 'error', duration: 2000 }) |
|||
} |
|||
}, |
|||
// 返回 |
|||
handleReturn() { |
|||
this.$emit('doback') |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
<style scoped> |
|||
</style> |
@ -1,8 +1,287 @@ |
|||
<template> |
|||
<div class="app-container"> |
|||
<div v-show="viewState == 1"> |
|||
<button-bar ref="btnbar" view-title="维修领/退料查询" :btndisabled="btndisabled" @btnhandle="btnHandle" /> |
|||
<div class="main-content"> |
|||
<div class="searchcon"> |
|||
<el-button size="small" class="searchbtn" @click="clicksearchShow"> |
|||
{{ searchxianshitit }} |
|||
</el-button> |
|||
<div v-show="isSearchShow" class="search"> |
|||
<el-form :inline="true" class="tab-header"> |
|||
<el-form-item label="单据查询"> |
|||
<el-input v-model="queryParams.params.goodsID" placeholder="" clearable /> |
|||
</el-form-item> |
|||
<el-form-item label="单据日期"> |
|||
<el-date-picker v-model="queryParams.params.createTimeStart" type="date" placeholder="选择日期" |
|||
format="yyyy-MM-dd" value-format="yyyy-MM-dd" style="width: 200px;"> |
|||
</el-date-picker> |
|||
至 |
|||
<el-date-picker v-model="queryParams.params.createTimeEnd" type="date" placeholder="选择日期" |
|||
format="yyyy-MM-dd" value-format="yyyy-MM-dd" style="width: 200px;"> |
|||
</el-date-picker> |
|||
</el-form-item> |
|||
<el-form-item label="维修工单编号"> |
|||
<el-input v-model="queryParams.params.vinNo" placeholder="" clearable /> |
|||
</el-form-item> |
|||
<el-form-item label="业务类型"> |
|||
<el-select v-model="queryParams.params.busTypeValue" filterable clearable placeholder="请选择" |
|||
style="width:100%"> |
|||
<el-option v-for="item in billStateList" :key="item.sid" :label="item.name" :value="item.name"> |
|||
</el-option> |
|||
</el-select> |
|||
</el-form-item> |
|||
<el-form-item label="操作人"> |
|||
<el-input v-model="queryParams.params.billNo" placeholder="" clearable /> |
|||
</el-form-item> |
|||
<el-form-item label="经办人"> |
|||
<el-input v-model="queryParams.params.billNo" placeholder="" clearable /> |
|||
</el-form-item> |
|||
</el-form> |
|||
<div class="btn" style="text-align: center;"> |
|||
<el-button type="primary" size="small" icon="el-icon-search" @click="dosearch">查询</el-button> |
|||
<el-button type="primary" size="small" icon="el-icon-refresh" @click="resetQuery">重置</el-button> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<!-- Start 项目列表头部 --> |
|||
<div class="listtop"> |
|||
<div class="tit">维修领/退料列表</div> |
|||
</div> |
|||
<!-- End 项目列表头部 --> |
|||
<!-- Start 项目列表 --> |
|||
<div class=""> |
|||
<el-table v-loading="tableLoading" :data="dataList" border style="width: 100%" |
|||
@selection-change="selectionLineChangeHandle"> |
|||
<el-table-column fixed width="50" type="selection" align="center" /> |
|||
<el-table-column fixed width="80" label="序号" type="index" :index="indexMethod" align="center" /> |
|||
<el-table-column label="单据编号" align="center"> |
|||
<template slot-scope="scope"> |
|||
<div style="color: #1890FF; text-decoration: underline ;" @click="showResult(scope.row.sid)"> |
|||
{{ scope.row.confirmResult }} |
|||
</div> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="goodsSpuName" label="单据时间"align="center" /> |
|||
<el-table-column prop="goodsSkuCode" label="维修工单编号" align="center" /> |
|||
<el-table-column prop="vinNo" label="业务类型" align="center" /> |
|||
<el-table-column prop="manufacturerName" label="操作人" align="center" /> |
|||
<el-table-column prop="goodsSkuOwnSpec" label="经办人" align="center" /> |
|||
<el-table-column prop="unit" label="备注" align="center" /> |
|||
|
|||
</el-table> |
|||
</div> |
|||
<!-- End 项目列表 --> |
|||
<div class="pages"> |
|||
<div class="tit" /> |
|||
<!-- 翻页 --> |
|||
<pagination v-show="dataList.length > 0" :total="queryParams.total" :page.sync="queryParams.current" |
|||
:limit.sync="queryParams.size" class="pagination" @pagination="loadList" /> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<!-- End 查询和其列表部分 --> |
|||
<!-- 新增修改部分组件 --> |
|||
<!-- <divAdd v-show="viewState == 2 || viewState == 3" ref="divadd" @doback="resetState" @reloadlist="loadList" /> --> |
|||
<!-- <divInfo v-show="viewState == 4" ref="divinfo" @doback="resetState" @reloadlist="loadList" /> --> |
|||
|
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
</script> |
|||
import req from '@/api/storage/oldPartsInAndOutStorage.js' |
|||
import ButtonBar from '@/components/ButtonBar' |
|||
import Pagination from '@/components/pagination' |
|||
import pageye from '@/components/pagination/pageye' |
|||
// import divAdd from './oldPartsInStorageAdd.vue' |
|||
// import divInfo from './oldPartsInvertoryInfo.vue' |
|||
export default { |
|||
components: { |
|||
ButtonBar, |
|||
Pagination, |
|||
pageye, |
|||
// divAdd, |
|||
// divInfo |
|||
}, |
|||
data() { |
|||
return { |
|||
dialogVisible: false, |
|||
btndisabled: false, |
|||
viewState: 1, // 1、列表 2、添加 3、修改 4、查看 |
|||
isSearchShow: false, |
|||
searchxianshitit: '显示查询条件', |
|||
tableLoading: false, |
|||
dataList: [], |
|||
btnList: [{ |
|||
type: 'success', |
|||
size: 'small', |
|||
icon: 'export', |
|||
btnKey: 'toBuild', |
|||
btnLabel: '导出' |
|||
}, |
|||
{ |
|||
type: 'info', |
|||
size: 'small', |
|||
icon: 'cross', |
|||
btnKey: 'doClose', |
|||
btnLabel: '关闭' |
|||
} |
|||
], |
|||
queryParams: { |
|||
current: 1, |
|||
size: 10, |
|||
total: 0, |
|||
params: { |
|||
name: '' |
|||
} |
|||
}, |
|||
sids: [], |
|||
selectionList: [], |
|||
billStateList: [{ |
|||
name: "维修出库", |
|||
sid: "0" |
|||
}, |
|||
{ |
|||
name: "维修退库", |
|||
sid: "1" |
|||
} |
|||
], |
|||
} |
|||
}, |
|||
mounted() { |
|||
this.$refs['btnbar'].setButtonList(this.btnList) |
|||
}, |
|||
created() { |
|||
this.loadList() |
|||
}, |
|||
methods: { |
|||
|
|||
selectionLineChangeHandle(val) { |
|||
console.log("val", val); |
|||
|
|||
this.selectionList = val |
|||
const aa = [] |
|||
val.forEach(element => { |
|||
aa.push(element.sid) |
|||
}) |
|||
this.sids = aa |
|||
|
|||
}, |
|||
// 搜索条件效果 |
|||
clicksearchShow() { |
|||
this.isSearchShow = !this.isSearchShow |
|||
if (this.isSearchShow) { |
|||
this.searchxianshitit = '隐藏查询条件' |
|||
} else { |
|||
this.searchxianshitit = '显示查询条件' |
|||
} |
|||
}, |
|||
btnHandle(btnKey) { |
|||
switch (btnKey) { |
|||
case 'doDel': |
|||
// this.doDel() |
|||
this.toRelevancy() |
|||
break |
|||
case 'toBuild': |
|||
this.toBuild() |
|||
break |
|||
case 'doClose': |
|||
this.doClose() |
|||
break |
|||
default: |
|||
break |
|||
} |
|||
}, |
|||
loadList() { |
|||
this.tableLoading = true |
|||
req.listPage(this.queryParams).then((resp) => { |
|||
this.tableLoading = false |
|||
if (resp.success) { |
|||
const data = resp.data |
|||
this.queryParams.total = data.total |
|||
this.dataList = data.records |
|||
} else { |
|||
// 根据resp.code进行异常情况处理 |
|||
this.dataList = [] |
|||
this.queryParams.total = 0 |
|||
} |
|||
}).catch(() => { |
|||
this.tableLoading = false |
|||
}) |
|||
}, |
|||
|
|||
<style> |
|||
</style> |
|||
// 序号 |
|||
indexMethod(index) { |
|||
var pagestart = (this.queryParams.current - 1) * this.queryParams.size |
|||
var pageindex = index + 1 + pagestart |
|||
return pageindex |
|||
}, |
|||
dosearch() { |
|||
this.queryParams.current = 1 |
|||
this.loadList() |
|||
}, |
|||
resetQuery() { |
|||
this.queryParams = { |
|||
current: 1, |
|||
size: 10, |
|||
total: 0, |
|||
params: { |
|||
name: '' |
|||
} |
|||
} |
|||
this.loadList() |
|||
}, |
|||
|
|||
toBuild() { |
|||
if (this.sids.length > 0) { |
|||
const loading = this.$loading({ |
|||
lock: true, |
|||
text: 'Loading', |
|||
spinner: 'el-icon-loading', |
|||
background: 'rgba(0, 0, 0, 0.7)' |
|||
}) |
|||
|
|||
|
|||
req.exportExcel(this.queryParams.params).then((resp) => { |
|||
loading.close() |
|||
const blob = new Blob([resp], { |
|||
type: 'application/vnd.ms-excel' |
|||
}) |
|||
const fileName = '旧件出入库记录' + '.xls' |
|||
const elink = document.createElement('a') |
|||
elink.download = fileName |
|||
elink.style.display = 'nonde' |
|||
elink.href = URL.createObjectURL(blob) |
|||
document.body.appendChild(elink) |
|||
elink.click() |
|||
URL.revokeObjectURL(elink.href) |
|||
document.body.removeChild(elink) |
|||
}).catch(() => { |
|||
loading.close() |
|||
}) |
|||
} else { |
|||
this.$message({ |
|||
type: "warning", |
|||
showClose: true, |
|||
message: '请至少选择一条记录进行操作' |
|||
}) |
|||
} |
|||
}, |
|||
|
|||
toRelevancy() { |
|||
this.viewState = 4 |
|||
this.$refs['divinfo'].showAdd() |
|||
}, |
|||
doClose() { |
|||
this.$store.dispatch('tagsView/delView', this.$route) |
|||
this.$router.go(-1) |
|||
}, |
|||
resetState() { |
|||
this.viewState = 1 |
|||
}, |
|||
|
|||
} |
|||
} |
|||
</script> |
|||
<style scoped> |
|||
</style> |
|||
|
@ -0,0 +1,164 @@ |
|||
<template> |
|||
<div class="app-container"> |
|||
<div> |
|||
<div class="tab-header webtop"> |
|||
<div>选择商品</div> |
|||
<div> |
|||
<el-button type="primary" size="small" @click="AddUpdateReturn">确定</el-button> |
|||
<el-button type="info" size="small" @click="handleReturn()">关闭</el-button> |
|||
</div> |
|||
</div> |
|||
<div class=""> |
|||
<div class="searchcon"> |
|||
<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="120px" class="tab-header"> |
|||
<el-form-item label="商品名称" class="searchlist"> |
|||
<el-input v-model="listQuery.params.goodsSpuName" placeholder="" clearable/> |
|||
</el-form-item> |
|||
<el-form-item label="商品编码" class="searchlist"> |
|||
<el-input v-model="listQuery.params.goodsSkuCode" placeholder="" clearable/> |
|||
</el-form-item> |
|||
<el-form-item label="供应商" class="searchlist"> |
|||
<el-input v-model="listQuery.params.manufacturerName" placeholder="" clearable /> |
|||
</el-form-item> |
|||
</el-form> |
|||
<div class="btn" style="text-align: center;"> |
|||
<el-button type="primary" icon="el-icon-search" @click="handleFilter" size="small">查询</el-button> |
|||
<el-button type="primary" icon="el-icon-refresh" @click="handleReset" size="small">重置</el-button> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="listtop"> |
|||
<div class="tit">商品列表</div> |
|||
<!-- <pageye v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current" :limit.sync="listQuery.size" class="pagination" @pagination="getList"/>--> |
|||
</div> |
|||
<div class=""> |
|||
<el-table :key="tableKey" ref="multipleTable" v-loading="listLoading" :data="list" border style="width: 100%" @selection-change="handleSelectionChange"> |
|||
<el-table-column width="50px" type="selection" align="center"/> |
|||
<el-table-column width="80px" label="序号" type="index" :index="indexMethod" align="center"/> |
|||
<el-table-column prop="goodsSpuName" label="商品名称" align="center" /> |
|||
<el-table-column prop="goodsSkuCode" label="商品编码" align="center" /> |
|||
<el-table-column prop="indexes" label="规格" align="center" /> |
|||
<el-table-column prop="goodsUnitName" label="单位" align="center" /> |
|||
<el-table-column prop="manufacturerName" label="供应商" align="center" /> |
|||
</el-table> |
|||
</div> |
|||
<div class="pages"> |
|||
<div class="tit"/> |
|||
<!-- 翻页 --> |
|||
<Pagination v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current" :limit.sync="listQuery.size" class="pagination" @pagination="getList"/> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import Pagination from '@/components/pagination' |
|||
import { chooseproducts } from '@/api/Common/dictcommons' |
|||
|
|||
export default { |
|||
name: 'SelectVehicle', |
|||
components: { |
|||
Pagination |
|||
}, |
|||
data() { |
|||
return { |
|||
isSearchShow: false, |
|||
searchxianshitit: '隐藏查询条件', |
|||
tableKey: 0, |
|||
sids: [], |
|||
list: [], |
|||
number: '', |
|||
listLoading: false, |
|||
listQuery: { |
|||
current: 1, |
|||
size: 5, |
|||
params: { |
|||
createOrgSid: '', |
|||
goodsSpuName: '', |
|||
goodsSkuCode: '', |
|||
manufacturerName: '' |
|||
}, |
|||
total: 0 |
|||
} |
|||
} |
|||
}, |
|||
methods: { |
|||
// 搜索条件效果 |
|||
clicksearchShow() { |
|||
this.isSearchShow = !this.isSearchShow |
|||
if (this.isSearchShow) { |
|||
this.searchxianshitit = '隐藏查询条件' |
|||
} else { |
|||
this.searchxianshitit = '显示查询条件' |
|||
} |
|||
}, |
|||
indexMethod(index) { |
|||
var pagestart = (this.listQuery.current - 1) * this.listQuery.size |
|||
var pageindex = index + 1 + pagestart |
|||
return pageindex |
|||
}, |
|||
// 查询列表信息 |
|||
getList() { |
|||
this.listLoading = true |
|||
chooseproducts(this.listQuery).then((response) => { |
|||
this.listLoading = false |
|||
if (response.success) { |
|||
this.listQuery.total = response.data.total |
|||
this.list = response.data.records |
|||
} |
|||
}) |
|||
}, |
|||
// 查询按钮 |
|||
handleFilter() { |
|||
this.listQuery.current = 1 |
|||
this.getList() |
|||
}, |
|||
// 重置按钮 |
|||
handleReset() { |
|||
this.listQuery.current = 1 |
|||
this.listQuery.size = 5 |
|||
this.listQuery.total = 0 |
|||
this.listQuery.params.goodsSpuName = '' |
|||
this.listQuery.params.goodsSkuCode = '' |
|||
this.listQuery.params.manufacturerName = '' |
|||
this.getList() |
|||
}, |
|||
handleSelectionChange(row) { |
|||
this.sids = row |
|||
}, |
|||
showData(value, createOrgSid) { |
|||
// const aa = [] |
|||
// if (value.length > 0) { |
|||
// for (var i = 0; i < value.length; i++) { |
|||
// aa.push(value[i].saleVehSid) |
|||
// } |
|||
// this.listQuery.params.saleVehSids = aa |
|||
// } else { |
|||
// this.listQuery.params.saleVehSids = [] |
|||
// }`` |
|||
this.listQuery.params.createOrgSid = createOrgSid |
|||
this.listQuery.current = 1 |
|||
this.listQuery.size = 5 |
|||
this.listQuery.total = 0 |
|||
this.getList() |
|||
}, |
|||
// 添加修改返回 |
|||
AddUpdateReturn() { |
|||
if (this.sids.length > 0) { |
|||
this.$emit('backData', this.sids) |
|||
} else { |
|||
this.$notify({ title: '提示', message: '请至少选择一条记录进行操作', type: 'error', duration: 2000 }) |
|||
} |
|||
}, |
|||
// 返回 |
|||
handleReturn() { |
|||
this.$emit('doback') |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
<style scoped> |
|||
</style> |
Loading…
Reference in new issue