Browse Source

完善维修单

master
yunuo970428 9 months ago
parent
commit
3af0758675
  1. 9
      yxt-as-ui/src/api/Common/dictcommons.js
  2. 18
      yxt-as-ui/src/api/operation/repairbill.js
  3. 22
      yxt-as-ui/src/views/operation/repairbill/repairbillAdd.vue
  4. 57
      yxt-as-ui/src/views/operation/repairbill/repairbillBYLeaveFactory.vue

9
yxt-as-ui/src/api/Common/dictcommons.js

@ -43,6 +43,15 @@ export function fetchBySid(sid) {
})
}
// 根据分公司全路径Sid获取分公司下开票信息(采购系统不能为空)
export function getInvoicingList(data) {
return request({
url: '/fin/v1/fincompanyinvoicing/getInvoicingList',
method: 'GET',
params: data
})
}
// 根据分公司Sid获取分公司下所有的部门
export function getListDeptByOrgSid(data) {
return request({

18
yxt-as-ui/src/api/operation/repairbill.js

@ -10,6 +10,24 @@ export default {
headers: { 'Content-Type': 'application/json' }
})
},
// 查询分页列表 -- 维修单出厂
listPageCC: function(params) {
return request({
url: '/as/v1/AsBusrepairBill/listPageCC',
method: 'post',
data: params,
headers: { 'Content-Type': 'application/json' }
})
},
// 查询分页列表 -- 维修单出厂 -- 出厂确认
carOutFactory: function(data) {
return request({
url: '/as/v1/AsBusrepairBill/carOutFactory',
method: 'post',
data: data,
headers: { 'Content-Type': 'application/json' }
})
},
saveOrUpdate: function(data) {
return request({
url: '/as/v1/AsBusrepairBill/saveBill',

22
yxt-as-ui/src/views/operation/repairbill/repairbillAdd.vue

@ -296,7 +296,11 @@
<el-row>
<el-col :span="8">
<div class="span-sty">开票单位</div>
<el-form-item><el-input class="addinputInfo addinputw" :disabled="formobj.nodeName == '维修'" v-model="formobj.invoiceVo.invoiceCompany" clearable placeholder="" /></el-form-item>
<el-form-item>
<el-select class="addinputInfo" :disabled="formobj.nodeName == '维修'" v-model="formobj.invoiceVo.invoiceCompanySid" placeholder="请选择" @change="changeCompanyInvoicing" clearable class="">
<el-option v-for="item in companyInvoicing_list" :key="item.companyInvoicingSid" :label="item.companyInvoicingName" :value="item.companyInvoicingSid"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="16">
<div class="span-sty">加税点的项目</div>
@ -616,7 +620,7 @@
<script>
import req from '@/api/operation/repairbill'
import additionitem from '@/api/basicinformation/additionitem'
import { selAllByOrgSidPath, selSubjectInfo, getGroupList, typeValues, getListByUseOrgSid, getServiceItemListPage } from '@/api/Common/dictcommons'
import { selAllByOrgSidPath, selSubjectInfo, getGroupList, typeValues, getListByUseOrgSid, getServiceItemListPage, getInvoicingList } from '@/api/Common/dictcommons'
import selectCustomer from '@/components/publicPage/selectCustomer'
import { getStorage } from '@/utils/auth'
@ -656,6 +660,7 @@ export default {
useInsurer_list: [], // 使
insuranceType_list: [], // 使
insuranceCompany_list: [], //
companyInvoicing_list: [], //
invoiceType_list: [], //
settle_list: [], //
otherSettle_list: [], //
@ -956,6 +961,11 @@ export default {
this.user_list = resp.data
}
})
getInvoicingList({ orgPath: window.sessionStorage.getItem('defaultOrgPath') }).then((res) => {
if (res.success) {
this.companyInvoicing_list = res.data
}
})
},
getNumber(val, limit) {
val = val.replace(/[^0-9.]/g, '') //
@ -1165,6 +1175,14 @@ export default {
this.formobj.invoiceVo.invoiceTypeKey = ''
}
},
changeCompanyInvoicing(value) {
const choose = this.companyInvoicing_list.filter((item) => item.companyInvoicingSid === value)
if (choose.length > 0 && choose !== null) {
this.formobj.invoiceVo.invoiceCompany = choose[0].companyInvoicingName
} else {
this.formobj.invoiceVo.invoiceCompany = ''
}
},
//
countChange() {
//

57
yxt-as-ui/src/views/operation/repairbill/repairbillBYLeaveFactory.vue

@ -92,17 +92,12 @@
<el-table :key="tableKey" v-loading="listLoading" :data="list" border style="width: 100%;" @selection-change="handleSelectionChange">
<el-table-column type="selection" align="center" width="50"/>
<el-table-column label="序号" type="index" width="80" :index="indexMethod" align="center"/>
<el-table-column label="是否可出厂" align="center" width="130">
<template slot-scope="scope">
<span>{{ scope.row.outDoorState == '1' ? '是' : scope.row.outDoorState == '0' ? '否' :'' }}</span>
</template>
</el-table-column>
<el-table-column prop="isOutFactory" label="是否可出厂" align="center" width="150" />
<el-table-column label="单据编号" align="center" width="180">
<template slot-scope="scope">
<span class="bluezi" @click="toInfo(scope.row)">{{ scope.row.billNo }}</span>
</template>
</el-table-column>
<el-table-column prop="nodeName" label="环节" align="center" width="80" />
<el-table-column prop="useOrgName" label="分公司" align="center" width="120" />
<el-table-column prop="dept" label="制单部门" align="center" width="120" />
<el-table-column prop="createByName" label="制单人" align="center" width="120" />
@ -172,6 +167,13 @@ export default {
return {
btndisabled: false,
btnList: [
{
type: 'primary',
size: 'small',
icon: '',
btnKey: 'toAffirm',
btnLabel: '出厂确认'
},
{
type: 'primary',
size: 'small',
@ -277,6 +279,9 @@ export default {
btnHandle(btnKey) {
console.log('XXXXXXXXXXXXXXX ' + btnKey)
switch (btnKey) {
case 'toAffirm':
this.toAffirm()
break
case 'toPrint':
this.toPrint()
break
@ -308,11 +313,10 @@ export default {
//
getList() {
this.listLoading = true
this.listQuery.params.nodeCode = '6'
this.listQuery.params.userSid = window.sessionStorage.getItem('userSid')
this.listQuery.params.orgPath = window.sessionStorage.getItem('defaultOrgPath')
this.listQuery.params.menuUrl = this.$route.path
req.listPage(this.listQuery).then(response => {
req.listPageCC(this.listQuery).then((response) => {
this.listLoading = false
if (response.success) {
this.list = response.data.records
@ -364,9 +368,44 @@ export default {
}
this.getList()
},
toAffirm() {
if (this.sids.length > 0) {
for (var i = 0; i < this.multipleSelection.length; i++) {
if (this.multipleSelection[i].isOutFactory === '否') {
this.$message({ showClose: true, type: 'error', message: '请选择是否可出厂为是的记录进行操作' })
return
}
}
} else {
this.$message({ showClose: true, type: 'error', message: '请至少选择一条记录进行操作' })
}
const tip = '请确认是否出厂所选 ' + this.sids.length + ' 条记录?'
this.$confirm(tip, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
const loading = this.$loading({
lock: true,
text: 'Loading',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
})
req.carOutFactory(this.sids).then((res) => {
if (res.success) {
this.$message({ showClose: true, type: 'success', message: '操作成功' })
this.getList()
}
loading.close()
}).catch(e => {
loading.close()
})
}).catch(() => {
})
},
toPrint() {
if (this.sids.length === 1) {
if (this.multipleSelection[0].outDoorState === '1') {
if (this.multipleSelection[0].isOutFactory === '是') {
req.printCard({ sid: this.sids[0] }).then((res) => {
if (res.success) {
var xhr = new XMLHttpRequest()

Loading…
Cancel
Save