Merge branch 'repair'
This commit is contained in:
commit
8d3f5c5cef
@ -504,7 +504,7 @@ export default {
|
||||
const res = await getMapBySoIdAndQuery(this.soId, this.inItemsQuery)
|
||||
this.inItems = Object.entries(res.data)
|
||||
this.inItems = this.inItems.map(([key, value]) => {
|
||||
return [key, value.filter(item => (!item.inCount && item.inCount !== item.goodsCount))]
|
||||
return [key, value.filter(item => item.inCount < item.goodsCount)]
|
||||
})
|
||||
this.inItems = this.inItems.filter(([key, value]) => value.length > 0)
|
||||
this.inItems.forEach(([key, value]) => {
|
||||
|
@ -94,11 +94,11 @@
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" v-if="type" @click="handlePass"
|
||||
<el-button type="primary" v-if="type" @click="handlePassBefore"
|
||||
:disabled="allSelectRows.length === 0 || allSelectRows.filter(item => !item.isStock).length !== 0">
|
||||
通知领料
|
||||
</el-button>
|
||||
<el-button type="primary" v-else @click="handlePass"
|
||||
<el-button type="primary" v-else @click="handlePassBefore"
|
||||
:disabled="allSelectRows.length === 0 || allSelectRows.filter(item => !item.isStock).length !== 0">
|
||||
通知退料
|
||||
</el-button>
|
||||
@ -156,7 +156,8 @@
|
||||
</el-table-column>
|
||||
<el-table-column label="分类" align="center" width="180" prop="wares.type">
|
||||
<div class="item" slot-scope="scope">
|
||||
<el-select class="item__input" clearable ref="selectTree" v-model="scope.row.wares.type" @change="save(scope.row)">
|
||||
<el-select class="item__input" clearable ref="selectTree" v-model="scope.row.wares.type"
|
||||
@change="save(scope.row)">
|
||||
<el-option v-for="server in optionData(serverList)"
|
||||
:key="server.value"
|
||||
:label="server.label"
|
||||
@ -244,6 +245,23 @@
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog :title="type ? '通知领料' : '通知退料'" :visible.sync="inPhoto" width="40%" v-dialogDrag append-to-body>
|
||||
<el-form :inline="true" label-width="15rem">
|
||||
<el-form-item :label="type ? '领料人' : '退料人'">
|
||||
<el-select v-model="chooseStaff" multiple clearable filterable>
|
||||
<el-option v-for="staff in staffs" :key="staff.id" :value="staff.userId" :label="staff.userName" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="图片上传">
|
||||
<ImageUpload v-model="images"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="handlePass">确定</el-button>
|
||||
<el-button type="primary" @click="inPhoto = false">取消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<TicketWaresShow ref="ticketWaresShow" :user-role="'repair_warehouse'" @success="getList" :type="false"/>
|
||||
</div>
|
||||
</template>
|
||||
@ -262,6 +280,7 @@ import {getCusAndCarById} from "@/api/repair/tickets/Tickets";
|
||||
import {getCarBrand} from "@/api/base/carbrand";
|
||||
import {listGoods} from "@/views/partner/api/workOrder";
|
||||
import {getBaseTypeList} from "@/api/base/type";
|
||||
import {listByTicketId} from "@/api/repair/repairworker";
|
||||
|
||||
export default {
|
||||
name: "WaresItem",
|
||||
@ -308,7 +327,11 @@ export default {
|
||||
},
|
||||
typeMap: null,
|
||||
allSelectRows: [],
|
||||
isRefresh: false
|
||||
isRefresh: false,
|
||||
inPhoto: false,
|
||||
images: null,
|
||||
chooseStaff: [],
|
||||
staffs: [],
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
@ -376,8 +399,30 @@ export default {
|
||||
getDictDatasToType(type) {
|
||||
return this.getDictDatas(type)
|
||||
},
|
||||
|
||||
handlePassBefore() {
|
||||
this.chooseStaff = []
|
||||
this.staffs = []
|
||||
this.getTicketStaff()
|
||||
this.images = null
|
||||
this.inPhoto = true
|
||||
},
|
||||
async getTicketStaff(){
|
||||
const res = await listByTicketId(this.ticketId)
|
||||
this.staffs = res.data
|
||||
this.chooseStaff.push(this.formData.repairId)
|
||||
},
|
||||
// 通过 true是全部、false是选择
|
||||
async handlePass() {
|
||||
if (this.images) {
|
||||
this.formData.images = this.images.split(",").map(item => {
|
||||
return item.replace(process.env.VUE_APP_FILE_API, "")
|
||||
}).join(",")
|
||||
}
|
||||
if ((!this.chooseStaff || this.chooseStaff.length === 0)){
|
||||
this.$modal.msgError(`请选择${this.type ? '领' : '退'}料人!`)
|
||||
return
|
||||
}
|
||||
// 生成领料单、退料单
|
||||
this.formData.repairSo = {
|
||||
soType: this.type ? "02" : "04",
|
||||
@ -386,6 +431,7 @@ export default {
|
||||
userName: this.formData.repairName,
|
||||
soTime: parseTime(Date.now(), '{y}-{m}-{d}'),
|
||||
soStatus: this.type ? "04" : "07",
|
||||
userIds: this.chooseStaff.join(",")
|
||||
// purchaseType: "01"
|
||||
}
|
||||
this.formData.repairSois = [...this.allSelectRows.map(item => {
|
||||
@ -408,6 +454,7 @@ export default {
|
||||
await this.getList()
|
||||
} finally {
|
||||
this.dialogVisible = false
|
||||
this.inPhoto = false
|
||||
}
|
||||
},
|
||||
// 生成采购 true是全部、false是选择
|
||||
@ -672,6 +719,8 @@ export default {
|
||||
}
|
||||
return item.wares
|
||||
})]
|
||||
|
||||
this.formData.twId = this.twId
|
||||
},
|
||||
validateNull() {
|
||||
const flag = this.partList.map(item => {
|
||||
|
Loading…
Reference in New Issue
Block a user