|
@@ -86,6 +86,36 @@
|
|
|
<div class="main">
|
|
|
<my-table ref="table" :data="data" :columns="columns" :table-page="params" @on-change="changePage"></my-table>
|
|
|
</div>
|
|
|
+ <Modal
|
|
|
+ v-model="shenpiModal"
|
|
|
+ title="审批"
|
|
|
+ class="shenpi"
|
|
|
+ width="900"
|
|
|
+ >
|
|
|
+ <h3>原数据</h3>
|
|
|
+ <ul>
|
|
|
+ <li>标签值:{{formData.rfid}}</li>
|
|
|
+ <li>提交人员:{{formData.realName}}</li>
|
|
|
+ <li>退仓时间:{{formData.time}}</li>
|
|
|
+ <li>面料名称:{{formData.materialName}}</li>
|
|
|
+ <li>退仓米数:{{formData.meters}}</li>
|
|
|
+ <li>退仓面积:{{formData.area }}</li>
|
|
|
+ </ul>
|
|
|
+ <h3>新数据</h3>
|
|
|
+ <ul>
|
|
|
+ <li>标签值:{{shenpiData.rfid}}</li>
|
|
|
+ <li>提交人员:{{formData.realName}}</li>
|
|
|
+ <li>退仓时间:{{shenpiData.operationTime || formData.time}}</li>
|
|
|
+ <li>面料名称:{{shenpiData.materialName}}</li>
|
|
|
+ <li>退仓米数:{{!shenpiData.materialMeters || shenpiData.materialMeters === -1 ? formData.meters : shenpiData.materialMeters}}</li>
|
|
|
+ <li>退仓面积:{{!shenpiData.materialMeters || shenpiData.materialMeters === -1 ? formData.area : shenpiData.materialMeters * shenpiData.width / 100 }}</li>
|
|
|
+ </ul>
|
|
|
+ <div slot="footer">
|
|
|
+ <Button type="error" size="large" @click="handleFlow(0)">拒绝</Button>
|
|
|
+ <Button type="primary" size="large" @click="handleFlow(1)">同意</Button>
|
|
|
+ </div>
|
|
|
+ </Modal>
|
|
|
+ <my-modal-form v-model="show" title="退料修改" :config="formConfig" :rule-validate="ruleValidate" :data="formData" type="edit" @confirm="cfm"></my-modal-form>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -93,12 +123,60 @@
|
|
|
import MyTable from '_c/my-table/my-table'
|
|
|
import axios from 'axios'
|
|
|
import dateSelect from '@/components/dateSelect/dateSelect'
|
|
|
-
|
|
|
+ import MyModalForm from '_c/my-modal-form/my-modal-form'
|
|
|
+ import {dateFormat} from '@/libs/util'
|
|
|
export default {
|
|
|
name: 'daily_report',
|
|
|
- components: { MyTable, dateSelect },
|
|
|
+ components: { MyTable, dateSelect,MyModalForm },
|
|
|
data() {
|
|
|
return {
|
|
|
+ shenpiModal:false,
|
|
|
+ formData:{},
|
|
|
+ show:false,
|
|
|
+ ruleValidate: {
|
|
|
+ name: [
|
|
|
+ { required: true, message: '仓库名称不能为空', trigger: 'blur' }
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ formConfig: [
|
|
|
+ {
|
|
|
+ type: 'date',
|
|
|
+ label: '退料时间',
|
|
|
+ key: 'time',
|
|
|
+ placeholder: '请选择退料时间',
|
|
|
+ comType:'datetime',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ type: 'input',
|
|
|
+ label: '退料人员',
|
|
|
+ key: 'realName',
|
|
|
+ placeholder: '请选择退料人员',
|
|
|
+ disabled:true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ type: 'materialBtn',
|
|
|
+ label: '物料名称',
|
|
|
+ key: 'name',
|
|
|
+ placeholder: '请输入物料名称',
|
|
|
+ multiple: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ type: 'input',
|
|
|
+ label: '已选物料',
|
|
|
+ key: 'name',
|
|
|
+ placeholder: '请选择物料',
|
|
|
+ disabled:true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ type: 'input',
|
|
|
+ label: '米数',
|
|
|
+ key: 'meters',
|
|
|
+ placeholder: '请输入米数',
|
|
|
+ comType: 'number',
|
|
|
+ },
|
|
|
+
|
|
|
+
|
|
|
+ ],
|
|
|
technologyType: '',
|
|
|
typeList: {},
|
|
|
data: [],
|
|
@@ -145,8 +223,79 @@
|
|
|
minWidth: 100,
|
|
|
align: 'center'
|
|
|
},
|
|
|
+ {
|
|
|
+ title: '操作',
|
|
|
+ key: 'action',
|
|
|
+
|
|
|
+ align: 'center',
|
|
|
+ width: '200px',
|
|
|
+ render: (h, params) => {
|
|
|
+ return h('div', [
|
|
|
+ h(
|
|
|
+ 'Icon',
|
|
|
+ {
|
|
|
+ props: {
|
|
|
+ custom: 'iconfont icon-edit',
|
|
|
+ size: '20',
|
|
|
+ color: '#087BE1',
|
|
|
+ },
|
|
|
+ style: {
|
|
|
+ marginRight: '20px',
|
|
|
+ display:(params.row.status === 0 || params.row.flowStatus === 0) ? 'none' : ''
|
|
|
+ },
|
|
|
+ on: {
|
|
|
+ click: () => {
|
|
|
+ this.formDataId = params.row.id
|
|
|
+ params.row.name = params.row.materialName
|
|
|
+ for (const key in params.row) {
|
|
|
+
|
|
|
+ this.formData[key] = params.row[key]
|
|
|
+ }
|
|
|
+ this.title = '修改'
|
|
|
+ this.formType = 'edit'
|
|
|
+ this.show = true
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ '修改'
|
|
|
+ ),
|
|
|
+ h(
|
|
|
+ 'Icon',
|
|
|
+ {
|
|
|
+ props: {
|
|
|
+ type: 'ios-paper',
|
|
|
+ size: '20',
|
|
|
+ color: '#087BE1',
|
|
|
+ },
|
|
|
+ style: {
|
|
|
+ marginRight: '20px',
|
|
|
+ display:(params.row.status === 0 || params.row.flowStatus != 0) ? 'none' : ''
|
|
|
+ },
|
|
|
+ on: {
|
|
|
+ click: () => {
|
|
|
+ for (const key in params.row) {
|
|
|
+
|
|
|
+ this.formData[key] = params.row[key]
|
|
|
+ }
|
|
|
+ axios.post('/cloudApi/stockBack/getFlowData',{id:params.row.id}).then(res => {
|
|
|
+
|
|
|
+ this.shenpiData = res.data.data
|
|
|
+ this.shenpiModal = true
|
|
|
+
|
|
|
+ })
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ '审批'
|
|
|
+ ),
|
|
|
+ ])
|
|
|
+ }
|
|
|
+ }
|
|
|
],
|
|
|
btnIndex: '',
|
|
|
+ shenpiData:{},
|
|
|
+ formDataId:null,
|
|
|
params: {
|
|
|
pageNum: 1,
|
|
|
pageSize: 10,
|
|
@@ -177,6 +326,40 @@
|
|
|
this.getAllList()
|
|
|
},
|
|
|
methods: {
|
|
|
+ handleFlow(_type){
|
|
|
+ axios.post('/cloudApi/stockBack/handleFlow',{id:this.formData.id,flowResult:_type}).then(res => {
|
|
|
+ this.show = false
|
|
|
+ this.$Message.info('审核成功')
|
|
|
+ this.shenpiModal = false
|
|
|
+ this.getList()
|
|
|
+ })
|
|
|
+ },
|
|
|
+ cfm (type, formData) {
|
|
|
+ console.log(formData)
|
|
|
+ if (type === 'add') {
|
|
|
+
|
|
|
+ axios.post('/cloudApi/stockBack/edit',{...formData}).then(res => {
|
|
|
+ this.show = false
|
|
|
+ this.$Message.info('新增成功')
|
|
|
+ this.getList()
|
|
|
+ })
|
|
|
+ } else if (type === 'edit') {
|
|
|
+
|
|
|
+ formData.operationTime = formData.time.length ? formData.time : null
|
|
|
+ formData.materialMeters = formData.meters
|
|
|
+ formData.materialId = formData.code
|
|
|
+ console.log(formData.operationTime)
|
|
|
+
|
|
|
+ axios.post('/cloudApi/stockBack/edit',{...formData,id:this.formDataId}).then(res => {
|
|
|
+ this.show = false
|
|
|
+ this.$Message.info('编辑成功')
|
|
|
+ this.getList()
|
|
|
+ }).catch(err=>{
|
|
|
+ console.log(err.data)
|
|
|
+ this.$Message.info(err.msg)
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
selectTime() {
|
|
|
this.getAllList()
|
|
|
},
|
|
@@ -237,6 +420,17 @@
|
|
|
</script>
|
|
|
|
|
|
<style lang="less" scoped>
|
|
|
+ .shenpi{
|
|
|
+ ul{
|
|
|
+ li{
|
|
|
+ list-style: none;
|
|
|
+ width:48%;
|
|
|
+ display: inline-block;
|
|
|
+ font-size: 14px;
|
|
|
+ line-height: 32px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
.container {
|
|
|
height: 100%;
|
|
|
display: flex;
|