工器具退料
This commit is contained in:
parent
217a917a49
commit
293da5a635
|
|
@ -16,19 +16,16 @@
|
||||||
<span class="title">任务信息</span>
|
<span class="title">任务信息</span>
|
||||||
</div>
|
</div>
|
||||||
<uni-forms :model="taskInfo" label-width="170rpx" :border="true">
|
<uni-forms :model="taskInfo" label-width="170rpx" :border="true">
|
||||||
<uni-forms-item label="班组:" name="teamName">
|
<uni-forms-item label="退料班组:" name="teamName">
|
||||||
<span style="height: 100%;display: flex;align-items: center;">{{ taskInfo.teamName }}</span>
|
<span style="height: 100%;display: flex;align-items: center;">{{ taskInfo.teamName }}</span>
|
||||||
</uni-forms-item>
|
</uni-forms-item>
|
||||||
<uni-forms-item label="工程:" name="proName">
|
<uni-forms-item label="工程名称:" name="proName">
|
||||||
<span style="height: 100%;display: flex;align-items: center;">{{ taskInfo.proName }}</span>
|
<span style="height: 100%;display: flex;align-items: center;">{{ taskInfo.proName }}</span>
|
||||||
</uni-forms-item>
|
</uni-forms-item>
|
||||||
<uni-forms-item label="单号:" name="code">
|
<uni-forms-item label="退料人员:" name="backPerson">
|
||||||
<span style="height: 100%;display: flex;align-items: center;">{{ taskInfo.code }}</span>
|
|
||||||
</uni-forms-item>
|
|
||||||
<uni-forms-item label="人员:" name="backPerson">
|
|
||||||
<span style="height: 100%;display: flex;align-items: center;">{{ taskInfo.backPerson }}</span>
|
<span style="height: 100%;display: flex;align-items: center;">{{ taskInfo.backPerson }}</span>
|
||||||
</uni-forms-item>
|
</uni-forms-item>
|
||||||
<uni-forms-item label="电话:" name="phone">
|
<uni-forms-item label="联系电话:" name="phone">
|
||||||
<span style="height: 100%;display: flex;align-items: center;">{{ taskInfo.phone }}</span>
|
<span style="height: 100%;display: flex;align-items: center;">{{ taskInfo.phone }}</span>
|
||||||
</uni-forms-item>
|
</uni-forms-item>
|
||||||
</uni-forms>
|
</uni-forms>
|
||||||
|
|
@ -68,9 +65,9 @@
|
||||||
<uni-th width="100px" style="font-size: 24rpx;" align="center">规格型号</uni-th>
|
<uni-th width="100px" style="font-size: 24rpx;" align="center">规格型号</uni-th>
|
||||||
<uni-th width="60px" style="font-size: 24rpx;" align="center">在用数</uni-th>
|
<uni-th width="60px" style="font-size: 24rpx;" align="center">在用数</uni-th>
|
||||||
<uni-th width="90px" style="font-size: 24rpx;" align="center">退料数</uni-th>
|
<uni-th width="90px" style="font-size: 24rpx;" align="center">退料数</uni-th>
|
||||||
<!-- <uni-th width="90px" style="font-size: 24rpx;" align="center">外观</uni-th> -->
|
<uni-th width="90px" style="font-size: 24rpx;" align="center">损坏价值判定</uni-th>
|
||||||
<uni-th width="90px" style="font-size: 24rpx;" align="center">完好数量</uni-th>
|
<!-- <uni-th width="90px" style="font-size: 24rpx;" align="center">完好数量</uni-th>-->
|
||||||
<uni-th width="90px" style="font-size: 24rpx;" align="center">损坏数量</uni-th>
|
<!-- <uni-th width="90px" style="font-size: 24rpx;" align="center">损坏数量</uni-th>-->
|
||||||
<uni-th width="70px" style="font-size: 24rpx;" align="center">操作</uni-th>
|
<uni-th width="70px" style="font-size: 24rpx;" align="center">操作</uni-th>
|
||||||
</uni-tr>
|
</uni-tr>
|
||||||
<!-- 表格数据行 -->
|
<!-- 表格数据行 -->
|
||||||
|
|
@ -88,40 +85,40 @@
|
||||||
:styles="{width: '100rpx'}"
|
:styles="{width: '100rpx'}"
|
||||||
/>
|
/>
|
||||||
</uni-td>
|
</uni-td>
|
||||||
|
<!-- <uni-td style="font-size: 24rpx;text-align: center;"> -->
|
||||||
|
<!-- <uni-easyinput -->
|
||||||
|
<!-- placeholder="完好数量" -->
|
||||||
|
<!-- v-model="item.goodNum" -->
|
||||||
|
<!-- type="number" -->
|
||||||
|
<!-- :clearable="false" -->
|
||||||
|
<!-- @change="changeNum(item)"-->
|
||||||
|
<!-- :styles="{width: '100rpx'}"-->
|
||||||
|
<!-- :disabled="!item.preNum"-->
|
||||||
|
<!-- />-->
|
||||||
|
<!-- </uni-td>-->
|
||||||
|
<!-- <uni-td style="font-size: 24rpx;text-align: center;"> -->
|
||||||
|
<!-- <uni-easyinput -->
|
||||||
|
<!-- placeholder="损坏数量" -->
|
||||||
|
<!-- v-model="item.badNum" -->
|
||||||
|
<!-- type="number" -->
|
||||||
|
<!-- :clearable="false" -->
|
||||||
|
<!-- @change="changeNum(item)"-->
|
||||||
|
<!-- :styles="{width: '100rpx'}"-->
|
||||||
|
<!-- :disabled="!item.preNum"-->
|
||||||
|
<!-- />-->
|
||||||
|
<!-- </uni-td>-->
|
||||||
<uni-td style="font-size: 24rpx;text-align: center;">
|
<uni-td style="font-size: 24rpx;text-align: center;">
|
||||||
<uni-easyinput
|
<uni-easyinput
|
||||||
placeholder="完好数量"
|
placeholder="损坏价值判定"
|
||||||
v-model="item.goodNum"
|
|
||||||
type="number"
|
|
||||||
:clearable="false"
|
|
||||||
@change="changeNum(item)"
|
|
||||||
:styles="{width: '100rpx'}"
|
|
||||||
:disabled="!item.preNum"
|
|
||||||
/>
|
|
||||||
</uni-td>
|
|
||||||
<uni-td style="font-size: 24rpx;text-align: center;">
|
|
||||||
<uni-easyinput
|
|
||||||
placeholder="损坏数量"
|
|
||||||
v-model="item.badNum"
|
|
||||||
type="number"
|
|
||||||
:clearable="false"
|
|
||||||
@change="changeNum(item)"
|
|
||||||
:styles="{width: '100rpx'}"
|
|
||||||
:disabled="!item.preNum"
|
|
||||||
/>
|
|
||||||
</uni-td>
|
|
||||||
<!-- <uni-td style="font-size: 24rpx;text-align: center;">
|
|
||||||
<uni-easyinput
|
|
||||||
placeholder="外观"
|
|
||||||
v-model="item.apDetection"
|
v-model="item.apDetection"
|
||||||
:styles="{width: '100rpx'}"
|
:styles="{width: '100rpx'}"
|
||||||
/>
|
/>
|
||||||
</uni-td> -->
|
</uni-td>
|
||||||
<uni-td style="font-size: 24rpx;text-align: center;">
|
<uni-td style="font-size: 24rpx;text-align: center;">
|
||||||
<view class="uni-group">
|
<view class="uni-group">
|
||||||
<view class="action-btn" @click="uploadImg(item)">
|
<!-- <view class="action-btn" @click="uploadImg(item)">-->
|
||||||
<uni-icons type="camera" size="20" style="color: #3784fb;"/>
|
<!-- <uni-icons type="camera" size="20" style="color: #3784fb;"/>-->
|
||||||
</view>
|
<!-- </view>-->
|
||||||
<view class="action-btn delete" @click="delRow(index)">
|
<view class="action-btn delete" @click="delRow(index)">
|
||||||
<uni-icons type="trash-filled" size="20" style="color: red;margin-left:10px;"/>
|
<uni-icons type="trash-filled" size="20" style="color: red;margin-left:10px;"/>
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -141,9 +138,10 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ref, reactive } from 'vue'
|
import { ref, reactive } from 'vue'
|
||||||
import { onLoad } from '@dcloudio/uni-app'
|
import { onLoad } from '@dcloudio/uni-app'
|
||||||
import { getUseType,insertApp } from '../../services/back.js';
|
import { editBack, getUseType, insertApp } from '../../services/back.js'
|
||||||
const title = ref('退料任务')
|
const title = ref('退料任务')
|
||||||
const taskInfo = ref({})
|
const taskInfo = ref({})
|
||||||
|
const tableList = ref({})
|
||||||
const maTypeSelectList = ref([])
|
const maTypeSelectList = ref([])
|
||||||
const typeId = ref("")//类型
|
const typeId = ref("")//类型
|
||||||
const maCodeSelectList = ref([])
|
const maCodeSelectList = ref([])
|
||||||
|
|
@ -218,16 +216,24 @@ const submitNum = () => {
|
||||||
icon: 'none',
|
icon: 'none',
|
||||||
})
|
})
|
||||||
return
|
return
|
||||||
|
} else if (typeList.value[i].preNum< typeList.value[i].num) {
|
||||||
|
uni.showToast({
|
||||||
|
title: `第${i + 1}行退料数量不能大于在用数量`,
|
||||||
|
icon: 'none',
|
||||||
|
duration: 1000,
|
||||||
|
})
|
||||||
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
let obj = {
|
let obj = {
|
||||||
"backApplyInfo": taskInfo.value,
|
"backApplyInfo": taskInfo.value,
|
||||||
"backApplyDetailsList":typeList.value
|
"backApplyDetailsList": [...typeList.value, ...tableList.value]
|
||||||
}
|
}
|
||||||
insertApp(obj).then(res => {
|
console.log("obj:",obj)
|
||||||
|
editBack(obj).then(res => {
|
||||||
console.log(res)
|
console.log(res)
|
||||||
if(res.code==200){
|
if(res.code==200){
|
||||||
uni.showToast({ title: '编辑成功', icon: 'none' })
|
uni.showToast({ title: '保存成功', icon: 'none' })
|
||||||
uni.navigateBack({
|
uni.navigateBack({
|
||||||
delta: 1 // 返回到已存在的页面
|
delta: 1 // 返回到已存在的页面
|
||||||
});
|
});
|
||||||
|
|
@ -342,9 +348,8 @@ const back = () => {
|
||||||
}
|
}
|
||||||
|
|
||||||
onLoad((options)=>{
|
onLoad((options)=>{
|
||||||
console.log(options)
|
|
||||||
taskInfo.value = JSON.parse(options.taskInfo)
|
taskInfo.value = JSON.parse(options.taskInfo)
|
||||||
console.log(taskInfo.value)
|
tableList.value = JSON.parse(options.tableList)
|
||||||
getMaType()
|
getMaType()
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -26,6 +26,7 @@
|
||||||
<view class="addBtn" @click="goNum">数量退料</view>
|
<view class="addBtn" @click="goNum">数量退料</view>
|
||||||
</uni-col>
|
</uni-col>
|
||||||
</uni-row>
|
</uni-row>
|
||||||
|
<scroll-view scroll-y @scrolltolower="onScrollTolower" class="scroll-container">
|
||||||
<div class="table-list-item" v-for="(item, index) in tableList" :key="index" @click="handleItem(item)">
|
<div class="table-list-item" v-for="(item, index) in tableList" :key="index" @click="handleItem(item)">
|
||||||
<uni-swipe-action class="swipe-action">
|
<uni-swipe-action class="swipe-action">
|
||||||
<uni-swipe-action-item @click="onClick($event, item)" :right-options="item.manageType==1 ? options:options2">
|
<uni-swipe-action-item @click="onClick($event, item)" :right-options="item.manageType==1 ? options:options2">
|
||||||
|
|
@ -63,12 +64,13 @@
|
||||||
</uni-swipe-action>
|
</uni-swipe-action>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
</scroll-view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ref, reactive } from 'vue'
|
import { ref, reactive } from 'vue'
|
||||||
import { getBackInfo,deleteNumType } from '../../services/back.js';
|
import { getBackInfo, deleteNumType, deleteDetailsById } from '../../services/back.js'
|
||||||
import { onLoad,onShow } from '@dcloudio/uni-app'
|
import { onLoad,onShow } from '@dcloudio/uni-app'
|
||||||
const title = ref('退料任务')
|
const title = ref('退料任务')
|
||||||
const keyWord = ref('')
|
const keyWord = ref('')
|
||||||
|
|
@ -138,7 +140,7 @@ const goCode = () => {
|
||||||
}
|
}
|
||||||
//数量新增
|
//数量新增
|
||||||
const goNum = () => {
|
const goNum = () => {
|
||||||
uni.navigateTo({ url: `/pages/toolsBack/toolsBackNum?taskInfo=${JSON.stringify(taskInfo.value)}` })
|
uni.navigateTo({ url: `/pages/toolsBack/toolsBackNum?taskInfo=${JSON.stringify(taskInfo.value)}&tableList=${JSON.stringify(tableList.value)}` })
|
||||||
}
|
}
|
||||||
const onClick = (e, item) => {
|
const onClick = (e, item) => {
|
||||||
const { index } = e
|
const { index } = e
|
||||||
|
|
@ -154,9 +156,8 @@ const onClick = (e, item) => {
|
||||||
if (index === 1) {
|
if (index === 1) {
|
||||||
let param = {
|
let param = {
|
||||||
id:item.id,
|
id:item.id,
|
||||||
parentId:item.parentId
|
|
||||||
}
|
}
|
||||||
deleteNumType(param).then(res => {
|
deleteDetailsById(param).then(res => {
|
||||||
console.log(res)
|
console.log(res)
|
||||||
if(res.code==200){
|
if(res.code==200){
|
||||||
uni.showToast({ title: '删除成功', icon: 'none' })
|
uni.showToast({ title: '删除成功', icon: 'none' })
|
||||||
|
|
|
||||||
|
|
@ -17,6 +17,24 @@ export const getBackInfo = (id,keyWord) => {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 退料修改
|
||||||
|
export const editBack = (data) => {
|
||||||
|
return http({
|
||||||
|
method: 'POST',
|
||||||
|
url: '/material/back_apply_info//edit',
|
||||||
|
data:data,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 详情删除
|
||||||
|
export const deleteDetailsById = (data) => {
|
||||||
|
return http({
|
||||||
|
method: 'POST',
|
||||||
|
url: '/material/back_apply_info/deleteDetailsById',
|
||||||
|
data:data,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
// 单位下拉选
|
// 单位下拉选
|
||||||
export const getUnitList = (data) => {
|
export const getUnitList = (data) => {
|
||||||
return http({
|
return http({
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue