Merge branch 'master' of http://10.153.19.25:10101/r/ERP_override
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <project version="4"> |
| | | <component name="dataSourceStorageLocal" created-in="IU-232.8660.185"> |
| | | <component name="dataSourceStorageLocal" created-in="IU-232.9559.62"> |
| | | <data-source name="@localhost [2]" uuid="165c5447-d19a-4aaf-af5f-cee92ae696c2"> |
| | | <database-info product="MySQL" version="8.0.22" jdbc-version="4.2" driver-name="MySQL Connector/J" driver-version="mysql-connector-java-8.0.25 (Revision: 08be9e9b4cba6aa115f9b27b215887af40b159e0)" dbms="MYSQL" exact-version="8.0.22" exact-driver-version="8.0"> |
| | | <extra-name-characters>#@</extra-name-characters> |
| | |
| | | //前端筛选功能 |
| | | |
| | | //筛选手动触发 |
| | | function changeFilterEvent (event, option, $panel) { |
| | | // 手动触发筛选 |
| | | $panel.changeOption(event, !!option.data, option) |
| | | } |
| | | |
| | | // 筛选函数 |
| | | const filterChanged = ({ option, row, column }) => { |
| | | if (option.data) { |
| | | return row[column.field].toString().toLowerCase().indexOf(option.data) > -1 |
| | | } |
| | | return true |
| | | } |
| | | |
| | | export {changeFilterEvent,filterChanged} |
| | |
| | | } |
| | | }) |
| | | |
| | | let pageNum=ref(1) |
| | | let total = reactive({ |
| | | pageTotal : 0, |
| | | dataTotal : 0, |
| | | pageSize : 10 |
| | | }) |
| | | |
| | | |
| | | //第一次调用 |
| | | request.post("/FinishedGoodsInventory/getseletwarehousing/1/100",filterData.value).then((res) => { |
| | | request.post(`/FinishedGoodsInventory/getseletwarehousing/1/${total.pageSize}`,filterData.value).then((res) => { |
| | | |
| | | if(res.code==200){ |
| | | console.log(res.data) |
| | | pageTotal.value=res.data.total |
| | | pageNum=1 |
| | | total.dataTotal = res.data.total.total*1 |
| | | total.pageTotal= res.data.total.pageTotal |
| | | pageNum.value=1 |
| | | produceList = deepClone(res.data.data) |
| | | xGrid.value.loadData(produceList) |
| | | gridOptions.loading=false |
| | |
| | | }) |
| | | |
| | | |
| | | //定义页面总页数 |
| | | let pageTotal=ref('') |
| | | //定义当前页数 |
| | | let pageNum=$ref(1) |
| | | |
| | | let pageState = null |
| | | |
| | | /*使用筛选,后端获取数据*/ |
| | |
| | | }else{ |
| | | filterData.value[column.property] = value |
| | | } |
| | | request.post("/FinishedGoodsInventory/getseletwarehousing/1/100",filterData.value).then((res) => { |
| | | request.post(`/FinishedGoodsInventory/getseletwarehousing/1/${total.pageSize}`,filterData.value).then((res) => { |
| | | |
| | | if(res.code==200){ |
| | | console.log(res.data) |
| | | pageTotal.value=res.data.total |
| | | pageNum=1 |
| | | total.dataTotal = res.data.total.total*1 |
| | | total.pageTotal= res.data.total.pageTotal |
| | | pageNum.value=1 |
| | | produceList = deepClone(res.data.data) |
| | | xGrid.value.loadData(produceList) |
| | | gridOptions.loading=false |
| | |
| | | } |
| | | }) |
| | | } |
| | | const selectOrderList = ()=>{ |
| | | |
| | | request.post(`/FinishedGoodsInventory/getseletwarehousing/${pageNum.value}/${total.pageSize}`,filterData.value).then((res) => { |
| | | |
| | | if(res.code==200){ |
| | | console.log(res.data) |
| | | produceList = deepClone(res.data.data) |
| | | xGrid.value.loadData(produceList) |
| | | gridOptions.loading=false |
| | | }else{ |
| | | ElMessage.warning(res.msg) |
| | | router.push("/login") |
| | | } |
| | | }) |
| | | } |
| | | //页脚跳转 |
| | | const handlePageChange = ({ currentPage, pageSize }) => { |
| | | total.pageTotal = pageSize |
| | | pageNum.value=currentPage |
| | | |
| | | selectOrderList() |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | |
| | | return[ |
| | | columns.map((column, columnIndex) => { |
| | | if (columnIndex === 0) { |
| | | return `页数:${pageNum}/${pageTotal.value}` |
| | | return `合计` |
| | | } |
| | | |
| | | return '' |
| | |
| | | </div> |
| | | </template> |
| | | |
| | | <template #pager> |
| | | <!--使用 pager 插槽--> |
| | | <vxe-pager |
| | | @page-change="handlePageChange" |
| | | :layouts="[ 'PrevJump', 'PrevPage', 'Jump','PageCount', 'NextPage', 'NextJump', 'Total']" |
| | | v-model:current-page="pageNum" |
| | | v-model:page-size="total.pageSize" |
| | | v-model:pager-count="total.pageTotal" |
| | | :total="total.dataTotal" |
| | | > |
| | | </vxe-pager> |
| | | </template> |
| | | |
| | | |
| | | </vxe-grid> |
| | | </div> |
| | |
| | | } |
| | | }) |
| | | let takeOut = ref(null) |
| | | |
| | | let pageNum=ref(1) |
| | | let total = reactive({ |
| | | pageTotal : 0, |
| | | dataTotal : 0, |
| | | pageSize : 10 |
| | | }) |
| | | //第一次调用 |
| | | request.post("/FinishedGoodsInventory/getSelectAllocate/1/100",filterData.value).then((res) => { |
| | | request.post(`/FinishedGoodsInventory/getSelectAllocate/1/${total.pageSize}`,filterData.value).then((res) => { |
| | | |
| | | if(res.code==200){ |
| | | console.log(res.data) |
| | | pageTotal.value=res.data.total |
| | | total.dataTotal = res.data.total.total*1 |
| | | total.pageTotal= res.data.total.pageTotal |
| | | pageNum.value=1 |
| | | takeOut.value=res.data.type |
| | | |
| | | pageNum=1 |
| | | produceList = deepClone(res.data.data) |
| | | xGrid.value.loadData(produceList) |
| | | gridOptions.loading=false |
| | |
| | | }) |
| | | |
| | | |
| | | //定义页面总页数 |
| | | let pageTotal=ref('') |
| | | //定义当前页数 |
| | | let pageNum=$ref(1) |
| | | let pageState = null |
| | | |
| | | /*使用筛选,后端获取数据*/ |
| | |
| | | }else{ |
| | | filterData.value[column.property] = value |
| | | } |
| | | request.post("/FinishedGoodsInventory/getSelectAllocate/1/100",filterData.value).then((res) => { |
| | | request.post(`/FinishedGoodsInventory/getSelectAllocate/1/${total.pageSize}`,filterData.value).then((res) => { |
| | | |
| | | if(res.code==200){ |
| | | console.log(res.data) |
| | | pageTotal.value=res.data.total |
| | | pageNum=1 |
| | | total.dataTotal = res.data.total.total*1 |
| | | total.pageTotal= res.data.total.pageTotal |
| | | pageNum.value=1 |
| | | produceList = deepClone(res.data.data) |
| | | xGrid.value.loadData(produceList) |
| | | gridOptions.loading=false |
| | |
| | | router.push("/login") |
| | | } |
| | | }) |
| | | } |
| | | |
| | | |
| | | const selectOrderList = ()=>{ |
| | | request.post(`/FinishedGoodsInventory/getSelectAllocate/${pageNum.value}/${total.pageSize}`,filterData.value).then((res) => { |
| | | |
| | | if(res.code==200){ |
| | | produceList = deepClone(res.data.data) |
| | | xGrid.value.loadData(produceList) |
| | | gridOptions.loading=false |
| | | }else{ |
| | | ElMessage.warning(res.msg) |
| | | router.push("/login") |
| | | } |
| | | }) |
| | | } |
| | | |
| | | |
| | | //页脚跳转 |
| | | const handlePageChange = ({ currentPage, pageSize }) => { |
| | | total.pageTotal = pageSize |
| | | pageNum.value=currentPage |
| | | |
| | | selectOrderList() |
| | | } |
| | | |
| | | |
| | |
| | | return[ |
| | | columns.map((column, columnIndex) => { |
| | | if (columnIndex === 0) { |
| | | return `页数:${pageNum}/${pageTotal.value}` |
| | | return `合计` |
| | | } |
| | | // if (props.tableProp.footList.includes(column.field)) { |
| | | // return sumNum(data, column.field) |
| | |
| | | </div> |
| | | </template> |
| | | |
| | | |
| | | <template #pager> |
| | | <!--使用 pager 插槽--> |
| | | <vxe-pager |
| | | @page-change="handlePageChange" |
| | | :layouts="[ 'PrevJump', 'PrevPage', 'Jump','PageCount', 'NextPage', 'NextJump', 'Total']" |
| | | v-model:current-page="pageNum" |
| | | v-model:page-size="total.pageSize" |
| | | v-model:pager-count="total.pageTotal" |
| | | :total="total.dataTotal" |
| | | > |
| | | </vxe-pager> |
| | | </template> |
| | | </vxe-grid> |
| | | </div> |
| | | </template> |
| | |
| | | const userid = userStore.user.userId |
| | | let router=useRouter() |
| | | let produceList = ref([]) |
| | | //定义页面总页数 |
| | | let pageTotal=ref('') |
| | | //定义当前页数 |
| | | let pageNum=$ref(1) |
| | | |
| | | const getTableRow = (row,type) =>{ |
| | | switch (type) { |
| | | case 'edit' :{ |
| | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | //筛选条件,有外键需要先定义明细里面的数据 |
| | | let filterData = ref({ |
| | | deliveryDetail:{ |
| | |
| | | } |
| | | }) |
| | | |
| | | let pageNum=ref(1) |
| | | let total = reactive({ |
| | | pageTotal : 0, |
| | | dataTotal : 0, |
| | | pageSize : 10 |
| | | }) |
| | | |
| | | |
| | | |
| | | //第一次调用 |
| | | request.post("/FinishedGoodsInventory/getseletdeliveryDetail/1/100",filterData.value).then((res) => { |
| | | request.post(`/FinishedGoodsInventory/getseletdeliveryDetail/1/${total.pageSize}`,filterData.value).then((res) => { |
| | | |
| | | if(res.code==200){ |
| | | console.log(res.data) |
| | | pageTotal.value=res.data.total |
| | | pageNum=1 |
| | | total.dataTotal = res.data.total.total*1 |
| | | total.pageTotal= res.data.total.pageTotal |
| | | pageNum.value=1 |
| | | produceList = deepClone(res.data.data) |
| | | xGrid.value.loadData(produceList) |
| | | gridOptions.loading=false |
| | |
| | | }else{ |
| | | filterData.value[column.property] = value |
| | | } |
| | | request.post("/FinishedGoodsInventory/getseletdeliveryDetail/1/100",filterData.value).then((res) => { |
| | | request.post(`/FinishedGoodsInventory/getseletdeliveryDetail/1/${total.pageSize}`,filterData.value).then((res) => { |
| | | |
| | | if(res.code==200){ |
| | | console.log(res.data) |
| | | pageTotal.value=res.data.total |
| | | pageNum=1 |
| | | total.dataTotal = res.data.total.total*1 |
| | | total.pageTotal= res.data.total.pageTotal |
| | | pageNum.value=1 |
| | | produceList = deepClone(res.data.data) |
| | | xGrid.value.loadData(produceList) |
| | | gridOptions.loading=false |
| | |
| | | router.push("/login") |
| | | } |
| | | }) |
| | | } |
| | | |
| | | |
| | | const selectOrderList = ()=>{ |
| | | |
| | | request.post(`/FinishedGoodsInventory/getseletdeliveryDetail/${pageNum.value}/${total.pageSize}`,filterData.value).then((res) => { |
| | | |
| | | if(res.code==200){ |
| | | console.log(res.data) |
| | | produceList = deepClone(res.data.data) |
| | | xGrid.value.loadData(produceList) |
| | | gridOptions.loading=false |
| | | }else{ |
| | | ElMessage.warning(res.msg) |
| | | router.push("/login") |
| | | } |
| | | }) |
| | | } |
| | | //页脚跳转 |
| | | const handlePageChange = ({ currentPage, pageSize }) => { |
| | | total.pageTotal = pageSize |
| | | pageNum.value=currentPage |
| | | |
| | | selectOrderList() |
| | | } |
| | | |
| | | |
| | |
| | | return[ |
| | | columns.map((column, columnIndex) => { |
| | | if (columnIndex === 0) { |
| | | return `页数:${pageNum}/${pageTotal.value}` |
| | | return `合计` |
| | | } |
| | | |
| | | return '' |
| | |
| | | </div> |
| | | </template> |
| | | |
| | | |
| | | <template #pager> |
| | | <!--使用 pager 插槽--> |
| | | <vxe-pager |
| | | @page-change="handlePageChange" |
| | | :layouts="[ 'PrevJump', 'PrevPage', 'Jump','PageCount', 'NextPage', 'NextJump', 'Total']" |
| | | v-model:current-page="pageNum" |
| | | v-model:page-size="total.pageSize" |
| | | v-model:pager-count="total.pageTotal" |
| | | :total="total.dataTotal" |
| | | > |
| | | </vxe-pager> |
| | | </template> |
| | | </vxe-grid> |
| | | </div> |
| | | </template> |
| | |
| | | }) |
| | | |
| | | let takeOut = ref(null) |
| | | |
| | | let pageNum=ref(1) |
| | | let total = reactive({ |
| | | pageTotal : 0, |
| | | dataTotal : 0, |
| | | pageSize : 10 |
| | | }) |
| | | //第一次调用 |
| | | request.post("/FinishedGoodsInventory/getSelectAllocate/1/100",filterData.value).then((res) => { |
| | | request.post(`/FinishedGoodsInventory/getSelectAllocate/1/${total.pageSize}`,filterData.value).then((res) => { |
| | | |
| | | if(res.code==200){ |
| | | console.log(res.data) |
| | | pageTotal.value=res.data.total |
| | | total.dataTotal = res.data.total.total*1 |
| | | total.pageTotal= res.data.total.pageTotal |
| | | pageNum.value=1 |
| | | takeOut.value=res.data.types |
| | | |
| | | pageNum=1 |
| | | produceList = deepClone(res.data.data) |
| | | xGrid.value.loadData(produceList) |
| | | gridOptions.loading=false |
| | |
| | | }) |
| | | |
| | | |
| | | //定义页面总页数 |
| | | let pageTotal=ref('') |
| | | //定义当前页数 |
| | | let pageNum=$ref(1) |
| | | let pageState = null |
| | | |
| | | /*使用筛选,后端获取数据*/ |
| | |
| | | }else{ |
| | | filterData.value[column.property] = value |
| | | } |
| | | request.post("/FinishedGoodsInventory/getSelectAllocate/1/100",filterData.value).then((res) => { |
| | | request.post(`/FinishedGoodsInventory/getSelectAllocate/1/${total.pageSize}`,filterData.value).then((res) => { |
| | | |
| | | if(res.code==200){ |
| | | console.log(res.data) |
| | | pageTotal.value=res.data.total |
| | | pageNum=1 |
| | | total.dataTotal = res.data.total.total*1 |
| | | total.pageTotal= res.data.total.pageTotal |
| | | pageNum.value=1 |
| | | produceList = deepClone(res.data.data) |
| | | xGrid.value.loadData(produceList) |
| | | gridOptions.loading=false |
| | |
| | | router.push("/login") |
| | | } |
| | | }) |
| | | } |
| | | |
| | | const selectOrderList = ()=>{ |
| | | |
| | | request.post(`/FinishedGoodsInventory/getSelectAllocate/${pageNum.value}/${total.pageSize}`,filterData.value).then((res) => { |
| | | |
| | | if(res.code==200){ |
| | | console.log(res.data) |
| | | produceList = deepClone(res.data.data) |
| | | xGrid.value.loadData(produceList) |
| | | gridOptions.loading=false |
| | | }else{ |
| | | ElMessage.warning(res.msg) |
| | | router.push("/login") |
| | | } |
| | | }) |
| | | } |
| | | //页脚跳转 |
| | | const handlePageChange = ({ currentPage, pageSize }) => { |
| | | total.pageTotal = pageSize |
| | | pageNum.value=currentPage |
| | | |
| | | selectOrderList() |
| | | } |
| | | |
| | | |
| | |
| | | return[ |
| | | columns.map((column, columnIndex) => { |
| | | if (columnIndex === 0) { |
| | | return `页数:${pageNum}/${pageTotal.value}` |
| | | return `合计` |
| | | } |
| | | // if (props.tableProp.footList.includes(column.field)) { |
| | | // return sumNum(data, column.field) |
| | |
| | | </div> |
| | | </template> |
| | | |
| | | <template #pager> |
| | | <!--使用 pager 插槽--> |
| | | <vxe-pager |
| | | @page-change="handlePageChange" |
| | | :layouts="[ 'PrevJump', 'PrevPage', 'Jump','PageCount', 'NextPage', 'NextJump', 'Total']" |
| | | v-model:current-page="pageNum" |
| | | v-model:page-size="total.pageSize" |
| | | v-model:pager-count="total.pageTotal" |
| | | :total="total.dataTotal" |
| | | > |
| | | </vxe-pager> |
| | | </template> |
| | | |
| | | |
| | | |
| | | </vxe-grid> |
| | | </div> |
| | |
| | | |
| | | } |
| | | }) |
| | | let pageNum=ref(1) |
| | | let total = reactive({ |
| | | pageTotal : 0, |
| | | dataTotal : 0, |
| | | pageSize : 10 |
| | | }) |
| | | |
| | | //第一次调用 |
| | | request.post("/FinishedGoodsInventory/getSelectAllocate/1/100",filterData.value).then((res) => { |
| | | request.post(`/FinishedGoodsInventory/getSelectAllocate/1/${total.pageSize}`,filterData.value).then((res) => { |
| | | |
| | | if(res.code==200){ |
| | | console.log(res.data) |
| | | pageTotal.value=res.data.total |
| | | pageNum=1 |
| | | total.dataTotal = res.data.total.total*1 |
| | | total.pageTotal= res.data.total.pageTotal |
| | | pageNum.value=1 |
| | | produceList = deepClone(res.data.data) |
| | | xGrid.value.loadData(produceList) |
| | | gridOptions.loading=false |
| | |
| | | }) |
| | | |
| | | |
| | | //定义页面总页数 |
| | | let pageTotal=ref('') |
| | | //定义当前页数 |
| | | let pageNum=$ref(1) |
| | | |
| | | let pageState = null |
| | | |
| | | /*使用筛选,后端获取数据*/ |
| | |
| | | }else{ |
| | | filterData.value[column.property] = value |
| | | } |
| | | request.post("/FinishedGoodsInventory/getSelectAllocate/1/100",filterData.value).then((res) => { |
| | | request.post(`/FinishedGoodsInventory/getSelectAllocate/1/${total.pageSize}`,filterData.value).then((res) => { |
| | | |
| | | if(res.code==200){ |
| | | console.log(res.data) |
| | | pageTotal.value=res.data.total |
| | | pageNum=1 |
| | | total.dataTotal = res.data.total.total*1 |
| | | total.pageTotal= res.data.total.pageTotal |
| | | pageNum.value=1 |
| | | produceList = deepClone(res.data.data) |
| | | xGrid.value.loadData(produceList) |
| | | gridOptions.loading=false |
| | |
| | | router.push("/login") |
| | | } |
| | | }) |
| | | } |
| | | |
| | | |
| | | const selectOrderList = ()=>{ |
| | | |
| | | request.post(`/FinishedGoodsInventory/getSelectAllocate/${pageNum.value}/${total.pageSize}`,filterData.value).then((res) => { |
| | | |
| | | if(res.code==200){ |
| | | console.log(res.data) |
| | | produceList = deepClone(res.data.data) |
| | | xGrid.value.loadData(produceList) |
| | | gridOptions.loading=false |
| | | }else{ |
| | | ElMessage.warning(res.msg) |
| | | router.push("/login") |
| | | } |
| | | }) |
| | | } |
| | | //页脚跳转 |
| | | const handlePageChange = ({ currentPage, pageSize }) => { |
| | | total.pageTotal = pageSize |
| | | pageNum.value=currentPage |
| | | |
| | | selectOrderList() |
| | | } |
| | | |
| | | |
| | |
| | | return[ |
| | | columns.map((column, columnIndex) => { |
| | | if (columnIndex === 0) { |
| | | return `页数:${pageNum}/${pageTotal.value}` |
| | | return `合计` |
| | | } |
| | | // if (props.tableProp.footList.includes(column.field)) { |
| | | // return sumNum(data, column.field) |
| | |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | | <template #pager> |
| | | <!--使用 pager 插槽--> |
| | | <vxe-pager |
| | | @page-change="handlePageChange" |
| | | :layouts="[ 'PrevJump', 'PrevPage', 'Jump','PageCount', 'NextPage', 'NextJump', 'Total']" |
| | | v-model:current-page="pageNum" |
| | | v-model:page-size="total.pageSize" |
| | | v-model:pager-count="total.pageTotal" |
| | | :total="total.dataTotal" |
| | | > |
| | | </vxe-pager> |
| | | </template> |
| | | |
| | | </vxe-grid> |
| | | </div> |
| | |
| | | } |
| | | }) |
| | | |
| | | let pageNum=ref(1) |
| | | let total = reactive({ |
| | | pageTotal : 0, |
| | | dataTotal : 0, |
| | | pageSize : 10 |
| | | }) |
| | | |
| | | |
| | | |
| | | //第一次调用 |
| | | request.post("/FinishedGoodsInventory/getselet/1/100",filterData.value).then((res) => { |
| | | request.post(`/FinishedGoodsInventory/getselet/1/${total.pageSize}`,filterData.value).then((res) => { |
| | | |
| | | if(res.code==200){ |
| | | console.log(res.data) |
| | | pageTotal.value=res.data.total |
| | | pageNum=1 |
| | | total.dataTotal = res.data.total.total*1 |
| | | total.pageTotal= res.data.total.pageTotal |
| | | pageNum.value=1 |
| | | produceList = deepClone(res.data.data) |
| | | xGrid.value.loadData(produceList) |
| | | gridOptions.loading=false |
| | |
| | | }) |
| | | |
| | | |
| | | //定义页面总页数 |
| | | let pageTotal=ref('') |
| | | //定义当前页数 |
| | | let pageNum=$ref(1) |
| | | let pageState = null |
| | | |
| | | /*使用筛选,后端获取数据*/ |
| | |
| | | }else{ |
| | | filterData.value[column.property] = value |
| | | } |
| | | request.post("/FinishedGoodsInventory/getselet/1/100",filterData.value).then((res) => { |
| | | request.post(`/FinishedGoodsInventory/getselet/1/${total.pageSize}`,filterData.value).then((res) => { |
| | | |
| | | if(res.code==200){ |
| | | console.log(res.data.data) |
| | | pageTotal.value=res.data.total |
| | | pageNum=1 |
| | | total.dataTotal = res.data.total.total*1 |
| | | total.pageTotal= res.data.total.pageTotal |
| | | pageNum.value=1 |
| | | produceList = deepClone(res.data.data) |
| | | xGrid.value.loadData(produceList) |
| | | gridOptions.loading=false |
| | |
| | | ElMessage.warning(res.msg) |
| | | } |
| | | }) |
| | | } |
| | | |
| | | const selectOrderList = ()=>{ |
| | | |
| | | request.post(`/FinishedGoodsInventory/getselet/${pageNum.value}/${total.pageSize}`,filterData.value).then((res) => { |
| | | |
| | | if(res.code==200){ |
| | | console.log(res.data) |
| | | produceList = deepClone(res.data.data) |
| | | xGrid.value.loadData(produceList) |
| | | gridOptions.loading=false |
| | | }else{ |
| | | ElMessage.warning(res.msg) |
| | | router.push("/login") |
| | | } |
| | | }) |
| | | } |
| | | //页脚跳转 |
| | | const handlePageChange = ({ currentPage, pageSize }) => { |
| | | total.pageTotal = pageSize |
| | | pageNum.value=currentPage |
| | | |
| | | selectOrderList() |
| | | } |
| | | |
| | | |
| | |
| | | return[ |
| | | columns.map((column, columnIndex) => { |
| | | if (columnIndex === 0) { |
| | | return `页数:${pageNum}/${pageTotal.value}` |
| | | return `合计` |
| | | } |
| | | |
| | | return '' |
| | |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | | <template #pager> |
| | | <!--使用 pager 插槽--> |
| | | <vxe-pager |
| | | @page-change="handlePageChange" |
| | | :layouts="[ 'PrevJump', 'PrevPage', 'Jump','PageCount', 'NextPage', 'NextJump', 'Total']" |
| | | v-model:current-page="pageNum" |
| | | v-model:page-size="total.pageSize" |
| | | v-model:pager-count="total.pageTotal" |
| | | :total="total.dataTotal" |
| | | > |
| | | </vxe-pager> |
| | | </template> |
| | | |
| | | </vxe-grid> |
| | | </div> |
| | |
| | | } |
| | | |
| | | }) |
| | | let pageNum=ref(1) |
| | | let total = reactive({ |
| | | pageTotal : 0, |
| | | dataTotal : 0, |
| | | pageSize : 10 |
| | | }) |
| | | |
| | | let selectDate = ref(["",""]) |
| | | |
| | | //第一次调用 |
| | | request.post("/FinishedGoodsInventory/getSelectOperateRecord/1/100/"+selectDate.value,filterData.value).then((res) => { |
| | | request.post(`/FinishedGoodsInventory/getSelectOperateRecord/1/${total.pageSize}/${selectDate.value}`,filterData.value).then((res) => { |
| | | |
| | | if(res.code==200){ |
| | | console.log(res.data) |
| | | pageTotal.value=res.data.total |
| | | total.dataTotal = res.data.total.total*1 |
| | | total.pageTotal= res.data.total.pageTotal |
| | | selectDate.value = res.data.selectDate |
| | | |
| | | pageNum=1 |
| | | pageNum.value=1 |
| | | produceList = deepClone(res.data.data) |
| | | xGrid.value.loadData(produceList) |
| | | gridOptions.loading=false |
| | |
| | | }) |
| | | |
| | | |
| | | //定义页面总页数 |
| | | let pageTotal=ref('') |
| | | //定义当前页数 |
| | | let pageNum=$ref(1) |
| | | let pageState = null |
| | | |
| | | /*使用筛选,后端获取数据*/ |
| | |
| | | }else{ |
| | | filterData.value[column.property] = value |
| | | } |
| | | request.post("/FinishedGoodsInventory/getSelectOperateRecord/1/100/"+selectDate.value,filterData.value).then((res) => { |
| | | request.post(`/FinishedGoodsInventory/getSelectOperateRecord/1/${total.pageSize}/${selectDate.value}`,filterData.value).then((res) => { |
| | | |
| | | if(res.code==200){ |
| | | console.log(res.data) |
| | | pageTotal.value=res.data.total |
| | | total.dataTotal = res.data.total.total*1 |
| | | total.pageTotal= res.data.total.pageTotal |
| | | selectDate.value = res.data.selectDate |
| | | pageNum=1 |
| | | |
| | | pageNum.value=1 |
| | | produceList = deepClone(res.data.data) |
| | | xGrid.value.loadData(produceList) |
| | | gridOptions.loading=false |
| | |
| | | } |
| | | }) |
| | | } |
| | | const a = {field:"status", title: '选择', width: '80',slots: { default: 'state' } } |
| | | |
| | | |
| | | const selectOrderList = ()=>{ |
| | | request.post("/FinishedGoodsInventory/getSelectOperateRecord/1/100/"+selectDate.value,filterData.value).then((res) => { |
| | | request.post(`/FinishedGoodsInventory/getSelectOperateRecord/${pageNum.value}/${total.pageSize}/${selectDate.value}`,filterData.value).then((res) => { |
| | | if(res.code==200){ |
| | | console.log(selectDate.value) |
| | | pageTotal.value=res.data.total |
| | | total.dataTotal = res.data.total.total*1 |
| | | total.pageTotal= res.data.total.pageTotal |
| | | selectDate.value = res.data.selectDate |
| | | |
| | | pageNum=1 |
| | | pageNum.value=1 |
| | | produceList = deepClone(res.data.data) |
| | | xGrid.value.loadData(produceList) |
| | | gridOptions.loading=false |
| | |
| | | } |
| | | |
| | | const changeDate = ()=>{ |
| | | selectOrderList() |
| | | } |
| | | |
| | | //页脚跳转 |
| | | const handlePageChange = ({ currentPage, pageSize }) => { |
| | | total.pageTotal = pageSize |
| | | pageNum.value=currentPage |
| | | |
| | | selectOrderList() |
| | | } |
| | | |
| | |
| | | return[ |
| | | columns.map((column, columnIndex) => { |
| | | if (columnIndex === 0) { |
| | | return `页数:${pageNum}/${pageTotal.value}` |
| | | return `合计` |
| | | } |
| | | // if (props.tableProp.footList.includes(column.field)) { |
| | | // return sumNum(data, column.field) |
| | |
| | | </div> |
| | | </template> |
| | | |
| | | <template #pager> |
| | | <!--使用 pager 插槽--> |
| | | <vxe-pager |
| | | @page-change="handlePageChange" |
| | | :layouts="[ 'PrevJump', 'PrevPage', 'Jump','PageCount', 'NextPage', 'NextJump', 'Total']" |
| | | v-model:current-page="pageNum" |
| | | v-model:page-size="total.pageSize" |
| | | v-model:pager-count="total.pageTotal" |
| | | :total="total.dataTotal" |
| | | > |
| | | </vxe-pager> |
| | | </template> |
| | | |
| | | |
| | | </vxe-grid> |
| | | </div> |
| | |
| | | |
| | | }) |
| | | |
| | | let pageNum=ref(1) |
| | | let total = reactive({ |
| | | pageTotal : 0, |
| | | dataTotal : 0, |
| | | pageSize : 10 |
| | | }) |
| | | |
| | | //第一次调用 |
| | | request.post("/FinishedGoodsInventory/getSelectOperateRecord/1/100/"+selectDate.value,filterData.value).then((res) => { |
| | | request.post(`/FinishedGoodsInventory/getSelectOperateRecord/1/${total.pageSize}/${selectDate.value}`,filterData.value).then((res) => { |
| | | |
| | | if(res.code==200){ |
| | | console.log(res.data) |
| | | pageTotal.value=res.data.total |
| | | selectDate.value = res.data.selectDate |
| | | total.dataTotal = res.data.total.total*1 |
| | | total.pageTotal= res.data.total.pageTotal |
| | | |
| | | pageNum=1 |
| | | selectDate.value = res.data.selectDate |
| | | pageNum.value=1 |
| | | produceList = deepClone(res.data.data) |
| | | xGrid.value.loadData(produceList) |
| | | gridOptions.loading=false |
| | |
| | | } |
| | | }) |
| | | |
| | | |
| | | //定义页面总页数 |
| | | let pageTotal=ref('') |
| | | //定义当前页数 |
| | | let pageNum=$ref(1) |
| | | let pageState = null |
| | | |
| | | /*使用筛选,后端获取数据*/ |
| | |
| | | }else{ |
| | | filterData.value[column.property] = value |
| | | } |
| | | request.post("/FinishedGoodsInventory/getSelectOperateRecord/1/100/"+selectDate.value,filterData.value).then((res) => { |
| | | request.post(`/FinishedGoodsInventory/getSelectOperateRecord/1/${total.pageSize}/${selectDate.value}`,filterData.value).then((res) => { |
| | | |
| | | if(res.code==200){ |
| | | console.log(res.data) |
| | | pageTotal.value=res.data.total |
| | | total.dataTotal = res.data.total.total*1 |
| | | total.pageTotal= res.data.total.pageTotal |
| | | |
| | | selectDate.value = res.data.selectDate |
| | | pageNum=1 |
| | | pageNum.value=1 |
| | | produceList = deepClone(res.data.data) |
| | | xGrid.value.loadData(produceList) |
| | | gridOptions.loading=false |
| | |
| | | } |
| | | }) |
| | | } |
| | | const a = {field:"status", title: '选择', width: '80',slots: { default: 'state' } } |
| | | |
| | | |
| | | |
| | | const selectOrderList = ()=>{ |
| | | request.post("/FinishedGoodsInventory/getSelectOperateRecord/1/100/"+selectDate.value,filterData.value).then((res) => { |
| | | request.post(`/FinishedGoodsInventory/getSelectOperateRecord/${pageNum.value}/${total.pageSize}/${selectDate.value}`,filterData.value).then((res) => { |
| | | if(res.code==200){ |
| | | console.log(selectDate.value) |
| | | pageTotal.value=res.data.total |
| | | total.dataTotal = res.data.total.total*1 |
| | | total.pageTotal= res.data.total.pageTotal |
| | | selectDate.value = res.data.selectDate |
| | | |
| | | pageNum=1 |
| | | pageNum.value=1 |
| | | produceList = deepClone(res.data.data) |
| | | xGrid.value.loadData(produceList) |
| | | gridOptions.loading=false |
| | |
| | | } |
| | | |
| | | const changeDate = ()=>{ |
| | | selectOrderList() |
| | | } |
| | | |
| | | //页脚跳转 |
| | | const handlePageChange = ({ currentPage, pageSize }) => { |
| | | total.pageTotal = pageSize |
| | | pageNum.value=currentPage |
| | | |
| | | selectOrderList() |
| | | } |
| | | |
| | |
| | | return[ |
| | | columns.map((column, columnIndex) => { |
| | | if (columnIndex === 0) { |
| | | return `页数:${pageNum}/${pageTotal.value}` |
| | | return `合计` |
| | | } |
| | | // if (props.tableProp.footList.includes(column.field)) { |
| | | // return sumNum(data, column.field) |
| | |
| | | </div> |
| | | </template> |
| | | |
| | | <template #pager> |
| | | <!--使用 pager 插槽--> |
| | | <vxe-pager |
| | | @page-change="handlePageChange" |
| | | :layouts="[ 'PrevJump', 'PrevPage', 'Jump','PageCount', 'NextPage', 'NextJump', 'Total']" |
| | | v-model:current-page="pageNum" |
| | | v-model:page-size="total.pageSize" |
| | | v-model:pager-count="total.pageTotal" |
| | | :total="total.dataTotal" |
| | | > |
| | | </vxe-pager> |
| | | </template> |
| | | |
| | | |
| | | </vxe-grid> |
| | | </div> |
| | |
| | | |
| | | let selectDate = ref(["",""]) |
| | | |
| | | let pageNum=ref(1) |
| | | let total = reactive({ |
| | | pageTotal : 0, |
| | | dataTotal : 0, |
| | | pageSize : 10 |
| | | }) |
| | | |
| | | //第一次调用 |
| | | request.post("/FinishedGoodsInventory/getselectAllocateFinishedOperateLog/1/100/"+selectDate.value,filterData.value).then((res) => { |
| | | request.post(`/FinishedGoodsInventory/getselectAllocateFinishedOperateLog/1/${total.pageSize}/${selectDate.value}`,filterData.value).then((res) => { |
| | | |
| | | if(res.code==200){ |
| | | console.log(res.data) |
| | | pageTotal.value=res.data.total |
| | | selectDate.value = res.data.selectDate |
| | | total.dataTotal = res.data.total.total*1 |
| | | total.pageTotal= res.data.total.pageTotal |
| | | |
| | | pageNum=1 |
| | | selectDate.value = res.data.selectDate |
| | | pageNum.value=1 |
| | | produceList = deepClone(res.data.data) |
| | | xGrid.value.loadData(produceList) |
| | | gridOptions.loading=false |
| | |
| | | }) |
| | | |
| | | |
| | | //定义页面总页数 |
| | | let pageTotal=ref('') |
| | | //定义当前页数 |
| | | let pageNum=$ref(1) |
| | | let pageState = null |
| | | |
| | | /*使用筛选,后端获取数据*/ |
| | |
| | | }else{ |
| | | filterData.value[column.property] = value |
| | | } |
| | | request.post("/FinishedGoodsInventory/getselectAllocateFinishedOperateLog/1/100/"+selectDate.value,filterData.value).then((res) => { |
| | | request.post(`/FinishedGoodsInventory/getselectAllocateFinishedOperateLog/1/${total.pageSize}/${selectDate.value}`,filterData.value).then((res) => { |
| | | |
| | | if(res.code==200){ |
| | | console.log(res.data) |
| | | pageTotal.value=res.data.total |
| | | total.dataTotal = res.data.total.total*1 |
| | | total.pageTotal= res.data.total.pageTotal |
| | | |
| | | selectDate.value = res.data.selectDate |
| | | pageNum=1 |
| | | pageNum.value=1 |
| | | produceList = deepClone(res.data.data) |
| | | xGrid.value.loadData(produceList) |
| | | gridOptions.loading=false |
| | |
| | | } |
| | | }) |
| | | } |
| | | const a = {field:"status", title: '选择', width: '80',slots: { default: 'state' } } |
| | | |
| | | |
| | | |
| | | const selectOrderList = ()=>{ |
| | | request.post("/FinishedGoodsInventory/getselectAllocateFinishedOperateLog/1/100/"+selectDate.value,filterData.value).then((res) => { |
| | | if(res.code==200){ |
| | | console.log(selectDate.value) |
| | | pageTotal.value=res.data.total |
| | | selectDate.value = res.data.selectDate |
| | | request.post(`/FinishedGoodsInventory/getselectAllocateFinishedOperateLog/${pageNum.value}/${total.pageSize}/${selectDate.value}`,filterData.value).then((res) => { |
| | | |
| | | pageNum=1 |
| | | if(res.code==200){ |
| | | total.dataTotal = res.data.total.total*1 |
| | | total.pageTotal= res.data.total.pageTotal |
| | | |
| | | selectDate.value = res.data.selectDate |
| | | pageNum.value=1 |
| | | produceList = deepClone(res.data.data) |
| | | xGrid.value.loadData(produceList) |
| | | gridOptions.loading=false |
| | |
| | | }) |
| | | } |
| | | |
| | | |
| | | const changeDate = ()=>{ |
| | | selectOrderList() |
| | | } |
| | | |
| | | //页脚跳转 |
| | | const handlePageChange = ({ currentPage, pageSize }) => { |
| | | total.pageTotal = pageSize |
| | | pageNum.value=currentPage |
| | | |
| | | selectOrderList() |
| | | } |
| | | |
| | |
| | | return[ |
| | | columns.map((column, columnIndex) => { |
| | | if (columnIndex === 0) { |
| | | return `页数:${pageNum}/${pageTotal.value}` |
| | | return `合计` |
| | | } |
| | | // if (props.tableProp.footList.includes(column.field)) { |
| | | // return sumNum(data, column.field) |
| | |
| | | </div> |
| | | </template> |
| | | |
| | | <template #pager> |
| | | <!--使用 pager 插槽--> |
| | | <vxe-pager |
| | | @page-change="handlePageChange" |
| | | :layouts="[ 'PrevJump', 'PrevPage', 'Jump','PageCount', 'NextPage', 'NextJump', 'Total']" |
| | | v-model:current-page="pageNum" |
| | | v-model:page-size="total.pageSize" |
| | | v-model:pager-count="total.pageTotal" |
| | | :total="total.dataTotal" |
| | | > |
| | | </vxe-pager> |
| | | </template> |
| | | |
| | | |
| | | </vxe-grid> |
| | | </div> |
| | |
| | | //定义接收加载表头下拉数据 |
| | | const titleSelectJson = ref({ |
| | | paymentTerms:[], |
| | | payMethod:[] |
| | | }) |
| | | |
| | | // 定义表头上传数据 |
| | |
| | | |
| | | if(res.code==200){ |
| | | titleSelectJson.value=deepClone(res.data) |
| | | titleUploadData.value.paymentTerms = titleSelectJson.value.paymentTerms[0].basicName |
| | | console.log(titleSelectJson.value) |
| | | const today = new Date |
| | | today.setTime(today.getTime() + (15 * 24 * 60 * 60 * 1000)) |
| | | titleUploadData.value.deliveryDate = today.getFullYear() + |
| | |
| | | |
| | | |
| | | titleUploadData.value=deepClone(res.data.title) |
| | | titleUploadData.value.paymentTerms = titleSelectJson.value.paymentTerms[0].basicName |
| | | titleUploadData.value.payMethod = titleSelectJson.value.payMethod[0].basicName |
| | | const today = new Date |
| | | today.setTime(today.getTime() + (15 * 24 * 60 * 60 * 1000)) |
| | | titleUploadData.value.deliveryDate=today.getFullYear() + |
| | |
| | | produceList = deepClone(res.data.data) |
| | | xGrid.value.loadData(produceList) |
| | | |
| | | //let arr = Object.values(gridOptions.toolbarConfig); |
| | | //arr[0].splice(1,2) |
| | | |
| | | //禁用按钮 |
| | | gridOptions.toolbarConfig.buttons[1].disabled = true |
| | | gridOptions.toolbarConfig.buttons[2].disabled = true |
| | |
| | | gridOptions.loading=false |
| | | }else{ |
| | | ElMessage.warning(res.msg) |
| | | router.push("/login") |
| | | } |
| | | }) |
| | | } |
| | |
| | | |
| | | |
| | | //根据审核状态显示审核按钮或者是反审按钮 |
| | | gridOptions.toolbarConfig.buttons[0].disabled = true |
| | | if(titleUploadData.value.deliveryState===1){ |
| | | |
| | | if(titleUploadData.value.deliveryState!==0){ |
| | | gridOptions.toolbarConfig.buttons[1].disabled = true |
| | | gridOptions.toolbarConfig.buttons[0].disabled = true |
| | | } |
| | | if(titleUploadData.value.deliveryState===0){ |
| | | gridOptions.toolbarConfig.buttons[2].disabled = true |
| | |
| | | produceList = deepClone(res.data.data) |
| | | xGrid.value.loadData(produceList) |
| | | //隐藏复选框 |
| | | xGrid.value.hideColumn("select") |
| | | /*xGrid.value.hideColumn("select") |
| | | gridOptions.loading=false*/ |
| | | xGrid.value.showColumn("select") |
| | | gridOptions.loading=false |
| | | |
| | | }else{ |
| | | ElMessage.warning(res.msg) |
| | | router.push("/login") |
| | | } |
| | | }) |
| | | } |
| | |
| | | ElMessage.error('请输入收款方式!') |
| | | return |
| | | } |
| | | const contacts = titleUploadData.value.contacts |
| | | if(contacts === null || contacts === undefined || contacts === ''){ |
| | | ElMessage.error('请输入联系人!') |
| | | return |
| | | } |
| | | |
| | | const contactNumber = titleUploadData.value.contactNumber |
| | | if(contactNumber === null || contactNumber === undefined || contactNumber === ''){ |
| | | ElMessage.error('请输入联系电话!') |
| | | return |
| | | } |
| | | const deliveryAddress = titleUploadData.value.deliveryAddress |
| | | if(deliveryAddress === null || deliveryAddress === undefined || deliveryAddress === ''){ |
| | | ElMessage.error('请输入送货地址!') |
| | | return |
| | | } |
| | | |
| | | |
| | | |
| | | let flowData = ref({ |
| | | delivery: selectRecords, |
| | | title: titleUploadData.value |
| | | title: titleUploadData.value, |
| | | deliveryId: route.query.deliveryID |
| | | |
| | | }) |
| | | console.log(flowData) |
| | |
| | | <div class="order-primary" style="background-color: white"> |
| | | <el-row> |
| | | <el-col :span="2"><el-text>客户编码:</el-text></el-col> |
| | | <el-col :span="3"><el-input style="font-size: large;color: #181818" v-model="titleUploadData.customerId" ></el-input></el-col> |
| | | <el-col :span="3"><el-input style="font-size: large;color: #181818" v-model="titleUploadData.customerId" :readonly="true" ></el-input></el-col> |
| | | <el-col :span="2"><el-text>客户名称:</el-text></el-col> |
| | | <el-col :span="5"><el-input v-model="titleUploadData.customerName"></el-input></el-col> |
| | | <el-col :span="5"><el-input v-model="titleUploadData.customerName" :readonly="true"></el-input></el-col> |
| | | <el-col :span="2"><el-text>项目名称:</el-text></el-col> |
| | | <el-col :span="5"><el-input v-model="titleUploadData.project"></el-input></el-col> |
| | | <el-col :span="5"><el-input v-model="titleUploadData.project" :readonly="true"></el-input></el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="2"><el-text>付款条件:</el-text></el-col> |
| | |
| | | /> |
| | | </el-select> |
| | | </el-col> |
| | | <el-col :span="2"><el-text>收款方式:</el-text></el-col> |
| | | <el-col :span="5"><el-input v-model="titleUploadData.payMethod"></el-input></el-col> |
| | | <el-col :span="2"><el-text>联系人:</el-text></el-col> |
| | | <el-col :span="5"><el-input v-model="titleUploadData.contacts"/></el-col> |
| | | <el-col :span="2"><el-text>收款日期:</el-text></el-col> |
| | | <el-col :span="5"> |
| | | <el-date-picker |
| | |
| | | |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="2"><el-text>联系人:</el-text></el-col> |
| | | <el-col :span="3"><el-input v-model="titleUploadData.contacts"/></el-col> |
| | | |
| | | <el-col :span="2"><el-text>收款方式:</el-text></el-col> |
| | | <el-col :span="3"> |
| | | <el-select v-model="titleUploadData.payMethod" clearable placeholder="" > |
| | | <el-option |
| | | v-for="item in titleSelectJson['payMethod']" |
| | | :key="item.id" |
| | | :label="item.basicName" |
| | | :value="item.basicName" |
| | | /> |
| | | </el-select> |
| | | </el-col> |
| | | <el-col :span="2"><el-text>联系电话:</el-text></el-col> |
| | | <el-col :span="5"><el-input v-model="titleUploadData.contactNumber"/></el-col> |
| | | <el-col :span="2"><el-text>送货地址:</el-text></el-col> |
| | |
| | | <el-col :span="2"><el-text>备注:</el-text></el-col> |
| | | <el-col :span="3"><el-input v-model="titleUploadData.remarks"/></el-col> |
| | | <el-col :span="2"><el-text>报表日期:</el-text></el-col> |
| | | <el-col :span="5"><el-input v-model="titleUploadData.createTime"></el-input></el-col> |
| | | <el-col :span="5"><el-input v-model="titleUploadData.createTime" :readonly="true"></el-input></el-col> |
| | | <el-col :span="2"><el-text>发货报表日期:</el-text></el-col> |
| | | <el-col :span="5"> |
| | | <el-date-picker |
| | |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="2"><el-text>业务员:</el-text></el-col> |
| | | <el-col :span="3"><el-input v-model="titleUploadData.salesman"/></el-col> |
| | | <el-col :span="3"><el-input v-model="titleUploadData.salesman" :readonly="true"/></el-col> |
| | | <el-col :span="2"><el-text>发货员:</el-text></el-col> |
| | | <el-col :span="5"><el-input v-model="titleUploadData.creator"/></el-col> |
| | | <el-col :span="5"><el-input v-model="titleUploadData.creator" :readonly="true"/></el-col> |
| | | </el-row> |
| | | </div> |
| | | <div class="order-detail"> |
| | |
| | | let selectDate = ref(["",""]) |
| | | |
| | | const xGrid = ref(); |
| | | let pageNum=ref(1) |
| | | let total = reactive({ |
| | | pageTotal : 0, |
| | | dataTotal : 0, |
| | | pageSize : 10 |
| | | }) |
| | | |
| | | //第一次调用 |
| | | request.post("/Delivery/getseletShippingOrder/1/100/"+selectDate.value,filterData.value).then((res) => { |
| | | request.post(`/Delivery/getseletShippingOrder/1/${total.pageSize}/${selectDate.value}`,filterData.value).then((res) => { |
| | | |
| | | if(res.code==200){ |
| | | console.log(res.data) |
| | | pageTotal.value=res.data.total |
| | | total.dataTotal = res.data.total.total*1 |
| | | total.pageTotal= res.data.total.pageTotal |
| | | |
| | | selectDate.value = res.data.selectDate |
| | | pageNum=1 |
| | | pageNum.value=1 |
| | | produceList = deepClone(res.data.data) |
| | | xGrid.value.loadData(produceList) |
| | | gridOptions.loading=false |
| | |
| | | }) |
| | | |
| | | |
| | | //定义页面总页数 |
| | | let pageTotal=ref('') |
| | | //定义当前页数 |
| | | let pageNum=$ref(1) |
| | | |
| | | |
| | | /*使用筛选,后端获取数据*/ |
| | | const changeFilterEvent = (event, option, $panel,) => { |
| | |
| | | }else{ |
| | | filterData.value[column.property] = value |
| | | } |
| | | request.post("/Delivery/getseletShippingOrder/1/100/"+selectDate.value,filterData.value).then((res) => { |
| | | request.post(`/Delivery/getseletShippingOrder/1/${total.pageSize}/${selectDate.value}`,filterData.value).then((res) => { |
| | | |
| | | if(res.code==200){ |
| | | console.log(res.data) |
| | | pageTotal.value=res.data.total |
| | | pageNum=1 |
| | | total.dataTotal = res.data.total.total*1 |
| | | total.pageTotal= res.data.total.pageTotal |
| | | pageNum.value=1 |
| | | produceList = deepClone(res.data.data) |
| | | xGrid.value.loadData(produceList) |
| | | gridOptions.loading=false |
| | |
| | | |
| | | |
| | | const selectOrderList = ()=>{ |
| | | request.post("/Delivery/getseletShippingOrder/1/100/"+selectDate.value,filterData.value).then((res) => { |
| | | request.post(`/Delivery/getseletShippingOrder/${pageNum.value}/${total.pageSize}/${selectDate.value}`,filterData.value).then((res) => { |
| | | |
| | | if(res.code==200){ |
| | | console.log(res.data) |
| | | pageTotal.value=res.data.total |
| | | pageNum=1 |
| | | produceList = deepClone(res.data.data) |
| | | xGrid.value.loadData(produceList) |
| | | gridOptions.loading=false |
| | |
| | | } |
| | | |
| | | const changeDate = ()=>{ |
| | | pageNum.value=1 |
| | | selectOrderList() |
| | | } |
| | | |
| | | //页脚跳转 |
| | | const handlePageChange = ({ currentPage, pageSize }) => { |
| | | total.pageTotal = pageSize |
| | | pageNum.value=currentPage |
| | | |
| | | selectOrderList() |
| | | } |
| | | |
| | |
| | | return[ |
| | | columns.map((column, columnIndex) => { |
| | | if (columnIndex === 0) { |
| | | return `页数:${pageNum}/${pageTotal.value}` |
| | | return `合计` |
| | | } |
| | | // if (props.tableProp.footList.includes(column.field)) { |
| | | // return sumNum(data, column.field) |
| | |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | | <template #pager> |
| | | <!--使用 pager 插槽--> |
| | | <vxe-pager |
| | | @page-change="handlePageChange" |
| | | :layouts="[ 'PrevJump', 'PrevPage', 'Jump','PageCount', 'NextPage', 'NextJump', 'Total']" |
| | | v-model:current-page="pageNum" |
| | | v-model:page-size="total.pageSize" |
| | | v-model:pager-count="total.pageTotal" |
| | | :total="total.dataTotal" |
| | | > |
| | | </vxe-pager> |
| | | </template> |
| | | </vxe-grid> |
| | | </div> |
| | | |
| | |
| | | }) |
| | | let selectDate = ref(["",""]) |
| | | |
| | | let pageNum=ref(1) |
| | | let total = reactive({ |
| | | pageTotal : 0, |
| | | dataTotal : 0, |
| | | pageSize : 10 |
| | | }) |
| | | |
| | | |
| | | //第一次调用 |
| | | request.post("/Delivery/getSelectOrderInventory/1/100/"+selectDate.value,filterData.value).then((res) => { |
| | | request.post(`/Delivery/getSelectOrderInventory/1/${total.pageSize}/${selectDate.value}`,filterData.value).then((res) => { |
| | | |
| | | if(res.code==200){ |
| | | pageTotal.value=res.data.total |
| | | console.log(res.data) |
| | | total.dataTotal = res.data.total.total*1 |
| | | total.pageTotal= res.data.total.pageTotal |
| | | selectDate.value = res.data.selectDate |
| | | pageNum=1 |
| | | pageNum.value=1 |
| | | produceList = deepClone(res.data.data) |
| | | xGrid.value.loadData(produceList) |
| | | gridOptions.loading=false |
| | |
| | | } |
| | | }) |
| | | |
| | | //定义页面总页数 |
| | | let pageTotal=ref('') |
| | | //定义当前页数 |
| | | let pageNum=$ref(1) |
| | | |
| | | const changeFilterEvent = (event, option, $panel,) => { |
| | | // 手动触发筛选 |
| | |
| | | }else{ |
| | | filterData.value[column.property] = value |
| | | } |
| | | request.post("/Delivery/getSelectOrderInventory/1/100/"+selectDate.value,filterData.value).then((res) => { |
| | | request.post(`/Delivery/getSelectOrderInventory/1/${total.pageSize}/${selectDate.value}`,filterData.value).then((res) => { |
| | | |
| | | if(res.code==200){ |
| | | console.log(res.data) |
| | | pageTotal.value=res.data.total |
| | | total.dataTotal = res.data.total.total*1 |
| | | total.pageTotal= res.data.total.pageTotal |
| | | selectDate.value = res.data.selectDate |
| | | pageNum=1 |
| | | pageNum.value=1 |
| | | produceList = deepClone(res.data.data) |
| | | xGrid.value.loadData(produceList) |
| | | gridOptions.loading=false |
| | |
| | | } |
| | | |
| | | const selectOrderList = ()=>{ |
| | | request.post("/Delivery/getSelectOrderInventory/1/100/"+selectDate.value,filterData.value).then((res) => { |
| | | request.post(`/Delivery/getSelectOrderInventory/${pageNum.value}/${total.pageSize}/${selectDate.value}`,filterData.value).then((res) => { |
| | | |
| | | if(res.code==200){ |
| | | console.log(res.data) |
| | | pageTotal.value=res.data.total |
| | | selectDate.value = res.data.selectDate |
| | | pageNum=1 |
| | | produceList = deepClone(res.data.data) |
| | | xGrid.value.loadData(produceList) |
| | | gridOptions.loading=false |
| | |
| | | } |
| | | |
| | | const changeDate = ()=>{ |
| | | pageNum.value=1 |
| | | selectOrderList() |
| | | } |
| | | |
| | | //页脚跳转 |
| | | const handlePageChange = ({ currentPage, pageSize }) => { |
| | | total.pageTotal = pageSize |
| | | pageNum.value=currentPage |
| | | |
| | | selectOrderList() |
| | | } |
| | | |
| | |
| | | return[ |
| | | columns.map((column, columnIndex) => { |
| | | if (columnIndex === 0) { |
| | | return `页数:${pageNum}/${pageTotal.value}` |
| | | return `合计:` |
| | | } |
| | | // if (props.tableProp.footList.includes(column.field)) { |
| | | // return sumNum(data, column.field) |
| | |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | | <template #pager> |
| | | <!--使用 pager 插槽--> |
| | | <vxe-pager |
| | | @page-change="handlePageChange" |
| | | :layouts="[ 'PrevJump', 'PrevPage', 'Jump','PageCount', 'NextPage', 'NextJump', 'Total']" |
| | | v-model:current-page="pageNum" |
| | | v-model:page-size="total.pageSize" |
| | | v-model:pager-count="total.pageTotal" |
| | | :total="total.dataTotal" |
| | | > |
| | | </vxe-pager> |
| | | </template> |
| | | </vxe-grid> |
| | | |
| | | |
| | |
| | | import request from "@/utils/request" |
| | | import deepClone from "@/utils/deepClone" |
| | | import useUserInfoStore from '@/stores/userInfo' |
| | | import SelectProduct from "@/views/sd/product/SelectProduct.vue" |
| | | import {changeFilterEvent,filterChanged} from "@/hook" |
| | | |
| | | let dialogTableVisible = ref(false) |
| | | let productVisible = ref(false) |
| | | const userStore = useUserInfoStore() |
| | | const router = useRouter() |
| | | const route = useRoute() |
| | |
| | | saleMan:[] |
| | | }) |
| | | let filterData = ref({}) |
| | | const filterChanged = ({ option, row, column }) => { |
| | | if (option.data) { |
| | | return row[column.field].toString().toLowerCase().indexOf(option.data) > -1 |
| | | } |
| | | return true |
| | | //@filter-change="filterChanged" |
| | | } |
| | | let rowIndex = ref(null) |
| | | |
| | | const gridOptions = reactive({ |
| | | border: "full",//表格加边框 |
| | | keepSource: true,//保持源数据 |
| | |
| | | } |
| | | ], |
| | | quantity: [ |
| | | { type: 'number', min: 0, message: '请输入大于等于0的数值' } |
| | | //type: 'number', min: 0, message: '请输入大于等于0的数值' , |
| | | { |
| | | validator ({ cellValue }) { |
| | | const regex = /^[1-9]\d*$/ |
| | | if (!regex.test(cellValue)) { |
| | | return new Error('输入大于0的整数') |
| | | } |
| | | }} |
| | | ], |
| | | width:[ |
| | | { |
| | |
| | | }, |
| | | cellDblclick (params) {//表格内容双击打开产品界面 |
| | | const { row } = params |
| | | productVisible.value = true |
| | | rowIndex=row |
| | | //console.log(row) |
| | | //alert("我打开了产品界面") |
| | | } |
| | | } |
| | | //获取子页面产品方法 |
| | | const getProductRow = (row) => { |
| | | rowIndex.productName = row.productName |
| | | rowIndex.productId = row.id |
| | | productVisible.value = false |
| | | } |
| | | |
| | | //初始化判断是否有id传入 |
| | |
| | | const area = parseFloat((row.width * row.height/1000000).toFixed(2)) |
| | | return parseFloat((area * row.quantity).toFixed(2)) |
| | | } |
| | | |
| | | //计算金钱 |
| | | const countMoney = (list) => { |
| | | let countMoney = 0 |
| | | list.forEach((item)=>{ |
| | |
| | | titleUploadData.value.money=countMoney(xGrid.value.getTableData().fullData).toString() |
| | | } |
| | | |
| | | // 手动触发筛选 |
| | | const changeFilterEvent = (event, option, $panel) => { |
| | | // 手动触发筛选 |
| | | $panel.changeOption(event, !!option.data, option) |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | |
| | | :autosize="{ minRows: 2, maxRows: 20 }" |
| | | /> |
| | | </el-dialog> |
| | | <el-dialog v-model="productVisible" style="width: 80%;height:75% "> |
| | | <select-product :rowIndex="rowIndex" @getProductRow="getProductRow" style="width: 100%;height: 100%" /> |
| | | </el-dialog> |
| | | |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | <script setup> |
| | | import {ArrowLeftBold, ArrowRight, Search} from "@element-plus/icons-vue" |
| | | import {useRouter,useRoute,onBeforeRouteUpdate} from "vue-router"; |
| | | import {watch} from "vue"; |
| | | |
| | | const router = useRouter() |
| | | const route = useRoute() |
| | | let indexFlag=$ref(1) |
| | |
| | | </template> |
| | | |
| | | <template #state="{ row,column}"> |
| | | <!-- <p>{{row[column.field]}}</p>--> |
| | | <el-checkbox @click.native.prevent :indeterminate="row[column.field]===1" :checked="row[column.field]===2"/> |
| | | </template> |
| | | |
| | |
| | | |
| | | <template #pager> |
| | | <!--使用 pager 插槽--> |
| | | <!-- 'PrevJump','NextJump', --> |
| | | <vxe-pager |
| | | @page-change="handlePageChange" |
| | | :layouts="[ 'PrevJump', 'PrevPage', 'Jump','PageCount', 'NextPage', 'NextJump', 'Total']" |
| | | :layouts="[ 'PrevPage', 'Jump','PageCount', 'NextPage', 'Total']" |
| | | v-model:current-page="pageNum" |
| | | v-model:page-size="total.pageSize" |
| | | v-model:pager-count="total.pageTotal" |
| | |
| | | <script setup> |
| | | import {onMounted, reactive, ref} from "vue" |
| | | import {computed, onMounted, reactive, ref} from "vue" |
| | | import {useRouter,useRoute} from "vue-router" |
| | | import request from "@/utils/request" |
| | | import {ElMessage} from "element-plus"; |
| | | import {ElMessage} from "element-plus" |
| | | import {changeFilterEvent,filterChanged} from "@/hook" |
| | | import SelectProduct from "@/views/sd/product/SelectProduct.vue"; |
| | | |
| | | const router = useRouter() |
| | | const route = useRoute() |
| | | let dialogTableVisible = ref(false) |
| | | let craftVisible = ref(false) |
| | | const xGrid = ref() |
| | | const gridOptions = reactive({ |
| | | border: "full",//表格加边框 |
| | |
| | | useKey: true |
| | | }, |
| | | filterConfig: { //筛选配置项 |
| | | remote: true |
| | | // remote: true |
| | | }, |
| | | customConfig: { |
| | | storage: true |
| | |
| | | },//表头参数 |
| | | columns:[ |
| | | {title: '操作', width: 110, slots: { default: 'button_slot' },fixed:"left",}, |
| | | {field: 'orderNumber',width:120, title: '序号',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'orderNumber',width:120, title: '序号',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true,filterMethod:filterChanged}, |
| | | //{field: 'orderDetail.buildingNumber',width:120, title: '楼号',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'orderDetail.productName',width:120, title: '成品名称',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'glassAddress',width:120, title: '标记',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'glassChild',width:120, title: '子产品',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'orderDetail.width',width:120, title: '成品宽',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'orderDetail.height',width:120, title: '成品高',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'orderDetail.shape',width:120, title: '形状',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'orderDetail.grossArea',width:120, title: '总尺寸',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'childWidth',width:120, title: '单片宽',editRender: { name: 'input'},filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'childHeight',width:120, title: '单片高',editRender: { name: 'input'},filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'orderDetail.area',width:120, title: '单片尺寸',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'orderDetail.quantity',width:120, title: '数量',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'process',width:120, title: '工艺流程',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'orderDetail.processingNote',width:120, title: '加工要求',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'orderDetail.remarks',width:120, title: '备注',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'orderDetail.edgingType',width:120, title: '磨边类型',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true} |
| | | {field: 'orderDetail.productName',width:120, title: '成品名称',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true,filterMethod:filterChanged}, |
| | | {field: 'glassAddress',width:120, title: '标记',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true,filterMethod:filterChanged}, |
| | | {field: 'glassChild',width:120, title: '子产品',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true,filterMethod:filterChanged}, |
| | | {field: 'orderDetail.width',width:120, title: '成品宽',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true,filterMethod:filterChanged}, |
| | | {field: 'orderDetail.height',width:120, title: '成品高',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true,filterMethod:filterChanged}, |
| | | {field: 'orderDetail.shape',width:120, title: '形状',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true,filterMethod:filterChanged}, |
| | | {field: 'totalArea',width:120, title: '总尺寸',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true,filterMethod:filterChanged}, |
| | | {field: 'childWidth',width:120, title: '单片宽',editRender: { name: 'input'},filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true,filterMethod:filterChanged}, |
| | | {field: 'childHeight',width:120, title: '单片高',editRender: { name: 'input'},filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true,filterMethod:filterChanged}, |
| | | {field: 'area',width:120, title: '单片尺寸',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true,filterMethod:filterChanged}, |
| | | {field: 'orderDetail.quantity',width:120, title: '数量',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true,filterMethod:filterChanged}, |
| | | {field: 'process',width:120, title: '工艺流程',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true,filterMethod:filterChanged}, |
| | | {field: 'icon',width:120, title: '商标',editRender: { name: 'input'},filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true,filterMethod:filterChanged}, |
| | | {field: 'orderDetail.processingNote',width:120, title: '加工要求',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true,filterMethod:filterChanged}, |
| | | {field: 'orderDetail.remarks',width:120, title: '备注',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true,filterMethod:filterChanged}, |
| | | {field: 'orderDetail.edgingType',width:120, title: '磨边类型',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true,filterMethod:filterChanged} |
| | | ],//表头按钮 |
| | | mergeCells: [ |
| | | /*{ row: 0, col: 1, rowspan: 4, colspan: 1 }, |
| | |
| | | processingNote:'' |
| | | }) |
| | | |
| | | let process = ref([]) |
| | | request.get(`/basicData/BasicDataByType/product/process`).then((res) =>{ |
| | | if (res.code==200){ |
| | | process.value=res.data |
| | | } |
| | | }) |
| | | |
| | | let rowIndex = ref({}) |
| | | const updateCraft = (row) => { |
| | | craftVisible.value= true |
| | | Object.keys(craftObj).forEach((key) =>{ |
| | | craftObj[key] = row['process'].split('->') |
| | | }) |
| | | rowIndex.value = row |
| | | } |
| | | const craftObj = reactive({ |
| | | newCraft: [], |
| | | oldCraft: [] |
| | | }) |
| | | const resetCraft = () => { |
| | | craftObj.newCraft = [] |
| | | } |
| | | |
| | | const saveCraft = () => { |
| | | rowIndex.value.process = craftObj.newCraft.join('->') |
| | | craftVisible.value= false |
| | | } |
| | | |
| | | const newCraftComputed = computed(() =>{ |
| | | return craftObj.newCraft.join('->') |
| | | }) |
| | | const oldCraftComputed = computed(() =>{ |
| | | return craftObj.oldCraft.join('->') |
| | | }) |
| | | |
| | | //初始化判断是否有id传入 |
| | | onMounted(()=>{ |
| | | const str = route.query.orderId |
| | |
| | | } |
| | | request.post(`/order/getOrderCraftById/${str}`).then((res) => { |
| | | if(res.code==200){ |
| | | console.log(res.data) |
| | | titleUploadData.value = res.data.order |
| | | |
| | | //取消审核按钮禁用 |
| | |
| | | } |
| | | }) |
| | | }) |
| | | //保存修改工艺 |
| | | const reviewOrderCraft = (state) => { |
| | | |
| | | request.post(`/order/reviewProcessById/${titleUploadData.value.orderId}/${state}`,xGrid.value.getRecordset().updateRecords).then(res =>{ |
| | |
| | | } |
| | | }) |
| | | } |
| | | |
| | | |
| | | |
| | | // |
| | | </script> |
| | | |
| | | <template> |
| | |
| | | |
| | | <!--左边固定显示的插槽--> |
| | | <template #button_slot="{ row }"> |
| | | <el-button @click="getTableRow(row,'edit')" link type="primary" size="small">修改工艺</el-button> |
| | | <el-button @click="updateCraft(row)" link type="primary" size="small">修改工艺</el-button> |
| | | </template> |
| | | |
| | | <template #num1_filter="{ column, $panel }"> |
| | |
| | | :autosize="{ minRows: 2, maxRows: 20 }" |
| | | /> |
| | | </el-dialog> |
| | | |
| | | <el-dialog v-model="craftVisible" title="工艺流程" style="width: 60%;height:60% ;position: relative;" > |
| | | <h5>工艺属性</h5> |
| | | <el-checkbox |
| | | v-model="craftObj.newCraft" |
| | | v-for="item in process" |
| | | :label="item.basicName" |
| | | class="glass-process-checkbox" |
| | | size="small" /> |
| | | |
| | | <el-row style="width: 90%;border: 0;position: absolute;bottom: 1rem; left: 50%;transform: translateX(-50%);"> |
| | | |
| | | <span class="ml-3 w-35 text-gray-600 inline-flex items-center" |
| | | >原流程: |
| | | </span> |
| | | <el-input :value="oldCraftComputed" disabled class="w-50 m-2" /> |
| | | <span class="ml-3 w-35 text-gray-600 inline-flex items-center" |
| | | >流程: |
| | | </span> |
| | | <el-input :value="newCraftComputed" disabled class="w-50 m-2" /> |
| | | <el-col style="margin-top: 0.5rem"> |
| | | <el-button type="primary" @click="resetCraft">重置</el-button> |
| | | <el-button type="primary" @click="saveCraft">保存</el-button> |
| | | </el-col> |
| | | </el-row> |
| | | |
| | | |
| | | |
| | | </el-dialog> |
| | | |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | width: 100%; |
| | | height: 90%; |
| | | } |
| | | |
| | | .el-dialog .el-col{ |
| | | border: 0;text-align: right |
| | | } |
| | | .el-dialog .el-text{ |
| | | font-weight: bolder |
| | | } |
| | | </style> |
| | |
| | | import request from "@/utils/request" |
| | | import deepClone from "@/utils/deepClone" |
| | | import {ElMessage} from "element-plus" |
| | | import {computed, ref} from "vue" |
| | | import {computed, onMounted, ref} from "vue" |
| | | import useUserInfo from "@/stores/userInfo" |
| | | import {useRouter,useRoute} from "vue-router" |
| | | import GlassType from "@/components/sd/product/GlassType.vue" |
| | | import useProductGlassTypeStore from "@/stores/sd/product/productGlassType" |
| | | |
| | | const router = useRouter() |
| | | const route = useRoute() |
| | | let userInfo = useUserInfo() |
| | | const disposeList = $ref([ |
| | | '彩釉', |
| | |
| | | let productDetailList = ref([]) |
| | | let productTotal = ref({ |
| | | productName:'', |
| | | query:'', |
| | | remarks:'', |
| | | thickness:'', |
| | | totalThickness:'', |
| | | typeId:'', |
| | | creator:userInfo.user.userName |
| | | }) |
| | | |
| | | let productGlassTypeStore = useProductGlassTypeStore() |
| | | productGlassTypeStore.GlassType=['',''] |
| | | |
| | | //页面加载请求 |
| | | request.get(`/basicData/BasicDataByType/product`).then((res) => { |
| | | if(res.code==200){ |
| | |
| | | } |
| | | }) |
| | | |
| | | |
| | | onMounted(()=>{ |
| | | const str = route.query.id |
| | | if (typeof str === 'undefined' || str === null || str === '' || str === '\n' || str === '\r'){ |
| | | return |
| | | } |
| | | request.post(`/product/selectProductById/${str}`).then((res) => { |
| | | if(res.code==200){ |
| | | productDetailList.value = res.data.detail |
| | | productDetailList.value.forEach((item)=>{ |
| | | item.separation = JSON.parse(item.separation) |
| | | }) |
| | | productTotal.value = res.data.title |
| | | //BasicData.value = res.data |
| | | }else{ |
| | | ElMessage.warning(res.msg) |
| | | } |
| | | }) |
| | | |
| | | }) |
| | | |
| | | const saveProduct = () => { |
| | | if(productDetailList.value.length===0){ |
| | | ElMessage.warning("请添加产品详情") |
| | |
| | | }else if(productDetailList.value[productDetailList.value.length-1].detailType!=='glass'){ |
| | | ElMessage.warning("产品详情最后一条不是玻璃,请完善") |
| | | return |
| | | }else if(productGlassTypeStore.GlassType[1]==='' || productGlassTypeStore.GlassType[1]===null){ |
| | | ElMessage.warning("请选择产品类别") |
| | | return |
| | | } |
| | | productTotal.value.typeId = productGlassTypeStore.GlassType[1] |
| | | |
| | | let productName = "" |
| | | productDetailList.value.forEach(item =>{ |
| | | switch(item.detailType){ |
| | |
| | | break |
| | | } |
| | | case 'Interlayer' :{ |
| | | productName+='+'+item.detail |
| | | productName+='+'+item.detail+"+" |
| | | break |
| | | } |
| | | case 'hollow' :{ |
| | | productName+='*'+item.detail |
| | | productName+='*'+item.detail+"*" |
| | | break |
| | | } |
| | | } |
| | | }) |
| | |
| | | } |
| | | request.post(`/product/saveProduct`,product).then((res) =>{ |
| | | if(res.code==200){ |
| | | ElMessage.success(res.msg) |
| | | ElMessage.success("创建成功") |
| | | router.push("/main/product/selectProduct") |
| | | } |
| | | }) |
| | | } |
| | | |
| | | //审核产品状态 |
| | | const updateProductState = (state) => { |
| | | request.post(`/product/updateProductStateById/${productTotal.value.id}/${state}`).then((res) =>{ |
| | | if(res.code==200){ |
| | | ElMessage.success("操作成功") |
| | | //router.go(0) |
| | | router.push({path:'/main/product/createProduct',query:{id:productTotal.value.id,random:Math.random()}}) |
| | | }else{ |
| | | ElMessage.error("操作失败") |
| | | } |
| | | }) |
| | | } |
| | | |
| | | const reset = () => { |
| | | processChecked.value=[] |
| | |
| | | index:null |
| | | }) |
| | | const updateGlass = (index) => { |
| | | stuff.value = productDetailList.value[index].separation |
| | | Object.keys(stuff.value).forEach((item)=>{ |
| | | stuff.value[item]=productDetailList.value[index].separation[item] |
| | | }) |
| | | processChecked.value = productDetailList.value[index].process.split("->") |
| | | glassFlag.value.flag=false |
| | | glassFlag.value.index=index |
| | |
| | | index:null |
| | | }) |
| | | const updateInterlayer = (index) => { |
| | | InterlayerBasic.value = productDetailList.value[index].separation |
| | | Object.keys(InterlayerBasic.value).forEach((item)=>{ |
| | | InterlayerBasic.value[item]=productDetailList.value[index].separation[item] |
| | | }) |
| | | |
| | | InterlayerFlag.value.flag=false |
| | | InterlayerFlag.value.index=index |
| | | } |
| | |
| | | index:null |
| | | }) |
| | | const updateHollow = (index) => { |
| | | hollowBasic.value = productDetailList.value[index].separation |
| | | Object.keys(hollowBasic.value).forEach((item)=>{ |
| | | hollowBasic.value[item]=productDetailList.value[index].separation[item] |
| | | }) |
| | | |
| | | hollowFlag.value.flag=false |
| | | hollowFlag.value.index=index |
| | | } |
| | |
| | | break |
| | | } |
| | | case 'Interlayer' :{ |
| | | productName+='+'+item.detail |
| | | productName+='+'+item.detail+"+" |
| | | break |
| | | } |
| | | case 'hollow' :{ |
| | | productName+='*'+item.detail |
| | | productName+='*'+item.detail+"*" |
| | | break |
| | | } |
| | | } |
| | | }) |
| | | return productName |
| | | }) |
| | | |
| | | |
| | | |
| | | </script> |
| | | |
| | |
| | | boxShadow: `var(--el-box-shadow-lighter)`, |
| | | }" |
| | | > |
| | | |
| | | <div class="glass-dispose"> |
| | | <!-- <h5>表面处理</h5>--> |
| | | <!-- <h5>玻璃类别</h5>--> |
| | | <div class="glass-dispose-detail"> |
| | | <glass-type style="float: left;margin-left: -0.5rem" /> |
| | | <!-- <div v-for="n in 2" class="glass-dispose-detail-1"> |
| | | <p style="writing-mode: vertical-rl;"> |
| | | {{n===1?'第一面':'第二面'}} |
| | | </p> |
| | | <div class="glass-dispose-detail-list" |
| | | v-for="(item,index) in disposeList" |
| | | > |
| | | <el-checkbox |
| | | :label="item" size="large" /> |
| | | <el-input |
| | | v-if="index==0 && n==1" |
| | | class="dispose-input" |
| | | size="small" |
| | | clearable /> |
| | | </div> |
| | | |
| | | </div>--> |
| | | </div> |
| | | </div> |
| | | <div class="line"/> |
| | | |
| | | <div class="glass-type"> |
| | | <h5>材料属性</h5> |
| | | <el-row :gutter="50"> |
| | |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | | <div class="line"/> |
| | | <div class="glass-dispose"> |
| | | <h5>表面处理</h5> |
| | | <div class="glass-dispose-detail"> |
| | | <div v-for="n in 2" class="glass-dispose-detail-1"> |
| | | <p style="writing-mode: vertical-rl;"> |
| | | {{n===1?'第一面':'第二面'}} |
| | | </p> |
| | | <div class="glass-dispose-detail-list" |
| | | v-for="(item,index) in disposeList" |
| | | > |
| | | <el-checkbox |
| | | :label="item" size="large" /> |
| | | <el-input |
| | | v-if="index==0 && n==1" |
| | | class="dispose-input" |
| | | size="small" |
| | | clearable /> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | <div class="line"/> |
| | | <div class="glass-process"> |
| | | <h5>工艺属性</h5> |
| | |
| | | style="margin-left: 0.5rem;text-align: center"> |
| | | 快速查询: |
| | | </el-text> |
| | | <el-input size="small" disabled /> |
| | | <el-input v-model="productTotal.query" size="small" disabled /> |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="5"> |
| | |
| | | style="margin-left: 0.5rem;text-align: center"> |
| | | 计重厚度: |
| | | </el-text> |
| | | <el-input size="small" disabled /> |
| | | <el-input v-model="productTotal.thickness" size="small" disabled /> |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="5"> |
| | |
| | | style="margin-left: 0.5rem;text-align: center"> |
| | | 厚度: |
| | | </el-text> |
| | | <el-input size="small" disabled /> |
| | | <el-input v-model="productTotal.totalThickness" size="small" disabled /> |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="5"> |
| | |
| | | style="margin-left: 0.5rem;text-align: center"> |
| | | 备注: |
| | | </el-text> |
| | | <el-input size="small" disabled /> |
| | | <el-input v-model="productTotal.remarks" size="small" /> |
| | | </div> |
| | | </el-col> |
| | | </el-row> |
| | |
| | | |
| | | </div> |
| | | <el-button |
| | | :disabled="productTotal.state===1" |
| | | @click="saveProduct" |
| | | style="float: right; |
| | | margin-right: 0.5rem;" |
| | | size="large" |
| | | type="primary" |
| | | round>创建</el-button> |
| | | round>{{productTotal.id?'修改':'创建'}}</el-button> |
| | | <el-button |
| | | v-if="productTotal.state===0" |
| | | @click="updateProductState(1)" |
| | | style="float: right; |
| | | margin-right: 0.5rem;" |
| | | size="large" |
| | | type="primary" |
| | | round>审核</el-button> |
| | | <el-button |
| | | v-else-if="productTotal.state===1" |
| | | @click="updateProductState(0)" |
| | | style="float: right; |
| | | margin-right: 0.5rem;" |
| | | size="large" |
| | | type="primary" |
| | | round>反审</el-button> |
| | | |
| | | </div> |
| | | |
| | | |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | } |
| | | .glass-dispose{ |
| | | width: 100%; |
| | | height: 20%; |
| | | height: 5%; |
| | | } |
| | | .glass-dispose-detail{ |
| | | margin-top: 0.5rem; |
| | |
| | | import request from "@/utils/request"; |
| | | import deepClone from "@/utils/deepClone"; |
| | | import {ElMessage} from "element-plus"; |
| | | import {useRouter} from "vue-router"; |
| | | import GlassType from '@/components/sd/product/GlassType.vue' |
| | | import {useRouter,useRoute,onBeforeRouteUpdate} from "vue-router"; |
| | | const router = useRouter() |
| | | const route = useRoute() |
| | | let indexFlag=$ref(1) |
| | | function changeRouter(index){ |
| | | indexFlag=index |
| | |
| | | </div> |
| | | |
| | | <div id="main-body"> |
| | | <router-view /> |
| | | <router-view :key="route.fullPath" /> |
| | | </div> |
| | | </div> |
| | | </template> |
| | |
| | | //监听玻璃类型改变 |
| | | let productList = ref([]) |
| | | let date=ref(['','']) |
| | | productGlassTypeStore.GlassType=['',''] |
| | | |
| | | |
| | | let props = defineProps({ |
| | | rowIndex:{} |
| | | }) |
| | | |
| | | let glassType = ref([]) |
| | | watch(productGlassTypeStore,(newVal,oldVal) => { |
| | | |
| | | |
| | | }) |
| | | const getProduct = () => { |
| | | request.post(`/product/1/100/${productGlassTypeStore.GlassType}`,filterData.value).then((res) => { |
| | | if(res.code==200){ |
| | |
| | | ElMessage.warning(res.msg) |
| | | } |
| | | }) |
| | | //删除与编辑方法 |
| | | const getTableRow = (row,type) => { |
| | | switch (type) { |
| | | case 'edit': { |
| | | router.push({path:'/main/product/createProduct',query:{id:row.id}}) |
| | | break |
| | | } |
| | | case 'delete': { |
| | | request.post(`/product/deleteProductById/${row.id}`).then((res) => { |
| | | if(res.code==200){ |
| | | //router.push("/main/product/selectProduct") |
| | | router.go(0) |
| | | ElMessage.success('删除成功') |
| | | }else{ |
| | | ElMessage.warning(res.msg) |
| | | } |
| | | }) |
| | | break |
| | | } |
| | | |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | |
| | | }, |
| | | columns:[ |
| | | {type:'expand',fixed:"left",slots: { content:'content' },width: 60}, |
| | | {type: 'seq',fixed:"left", title: '自序', width: 80 }, |
| | | {title: '操作', width: 110, slots: { default: 'button_slot' },fixed:"left"}, |
| | | {field:'state',title: '审核', width: 40, slots: { default: 'state' }}, |
| | | {type: 'seq',fixed:"left", title: '自序', width: 80 }, |
| | | {field: 'id', title: '编号',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: false}, |
| | | {field: 'productName', title: '名称',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: false}, |
| | | {field: 'basicGlassType.typeName', title: '所属类别',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: false}, |
| | |
| | | }) |
| | | } |
| | | |
| | | let emit = defineEmits([ |
| | | 'getProductRow' |
| | | ]) |
| | | |
| | | |
| | | const emitParent = (row) => { |
| | | emit('getProductRow', row) |
| | | } |
| | | |
| | | |
| | | /*后端返回结果多层嵌套展示*/ |
| | |
| | | <ul class="expand-wrapper"> |
| | | <li v-for="(item,index) in gridOptions.columns" v-show="item.field!=undefined "> |
| | | <span style="font-weight: bold">{{item.title+': '}}</span> |
| | | <span v-if="hasDecimal(item.field)">{{ row[item.field.split('.')[0]][item.field.split('.')[1]] }}</span> |
| | | <span v-if="hasDecimal(item.field)">{{ row[item.field] }}</span> |
| | | <span v-else>{{ row[item.field] }}</span> |
| | | |
| | | </li> |
| | |
| | | </template> |
| | | |
| | | <!--左边固定显示的插槽--> |
| | | <template #button_slot="{ row }"> |
| | | <template #button_slot="{ row }" v-if="!props.rowIndex"> |
| | | <el-button @click="getTableRow(row,'edit')" link type="primary" size="small">编辑</el-button> |
| | | <el-button @click="getTableRow(row,'delete')" link type="primary" size="small">删除</el-button> |
| | | <el-popconfirm @confirm="getTableRow(row,'delete')" title="确认删除产品?"> |
| | | <template #reference> |
| | | <el-button link type="primary" size="small">删除</el-button> |
| | | </template> |
| | | </el-popconfirm> |
| | | </template> |
| | | <template #button_slot="{ row }" v-else> |
| | | <el-button @click="emitParent(row)" link type="primary" size="small">添加</el-button> |
| | | </template> |
| | | |
| | | <template #num1_filter="{ column, $panel }"> |
| | |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | | <template #state="{ row,column}"> |
| | | <el-checkbox @click.native.prevent :checked="row[column.field]===1"/> |
| | | </template> |
| | | |
| | | </vxe-grid> |
| | | |
| | |
| | | import com.example.erp.entity.sd.OrderDetail; |
| | | import com.example.erp.exception.ServiceException; |
| | | import com.example.erp.service.mm.FinishedGoodsInventoryService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import com.example.erp.entity.mm.FinishedGoodsInventory; |
| | |
| | | |
| | | @RestController |
| | | @RequestMapping("/FinishedGoodsInventory") |
| | | @Api(value="成品库存controller",tags={"成品库存操作接口"}) |
| | | public class FinishedGoodsInventoryController { |
| | | @Autowired |
| | | FinishedGoodsInventoryService finishedGoodsInventoryService; |
| | | |
| | | /*成品库存查询*/ |
| | | @ApiOperation("成品库存查询接口") |
| | | @PostMapping("/getselet/{pageNum}/{pageSize}") |
| | | public Result defaultDateFinishedGoodsInventory(@PathVariable Integer pageNum, @PathVariable Integer pageSize, @RequestBody FinishedGoodsInventory finishedGoodsInventory){ |
| | | return Result.seccess(finishedGoodsInventoryService.defaultDateFinishedGoodsInventory(pageNum,pageSize,finishedGoodsInventory)); |
| | | } |
| | | |
| | | /*查询可入库的成品数据*/ |
| | | @ApiOperation("可入库的成品查询接口") |
| | | @PostMapping("/getseletwarehousing/{pageNum}/{pageSize}") |
| | | public Result getseletwarehousing(@PathVariable Integer pageNum, @PathVariable Integer pageSize, @RequestBody FlowCard flowCard){ |
| | | return Result.seccess(finishedGoodsInventoryService.getseletwarehousing(pageNum,pageSize,flowCard)); |
| | | } |
| | | |
| | | /*成品入库*/ |
| | | @ApiOperation("成品入库接口") |
| | | @PostMapping("/addseletwarehousing") |
| | | public Result addseletwarehousing( @RequestBody Map<String,Object> object){ |
| | | if(finishedGoodsInventoryService.addseletwarehousing(object)){ |
| | |
| | | } |
| | | |
| | | /*查询可发货的成品数据*/ |
| | | @ApiOperation("可发货的成品查询接口") |
| | | @PostMapping("/getseletdeliveryDetail/{pageNum}/{pageSize}") |
| | | public Result getseletdeliveryDetail(@PathVariable Integer pageNum, @PathVariable Integer pageSize, @RequestBody OrderDetail orderDetail){ |
| | | return Result.seccess(finishedGoodsInventoryService.getseletdeliveryDetail(pageNum,pageSize,orderDetail)); |
| | | } |
| | | |
| | | /*成品发货*/ |
| | | @ApiOperation("成品发货接口") |
| | | @PostMapping("/adddeliveryDetail") |
| | | public Result adddeliveryDetail( @RequestBody Map<String,Object> object){ |
| | | if(finishedGoodsInventoryService.adddeliveryDetail(object)){ |
| | |
| | | } |
| | | |
| | | /* 调拨查询*/ |
| | | @ApiOperation("可调拨数据查询接口") |
| | | @PostMapping("/getSelectAllocate/{pageNum}/{pageSize}") |
| | | public Result getSelectAllocate(@PathVariable Integer pageNum, @PathVariable Integer pageSize, @RequestBody OrderDetail orderDetail){ |
| | | return Result.seccess(finishedGoodsInventoryService.getSelectAllocate(pageNum,pageSize,orderDetail)); |
| | | } |
| | | |
| | | /*订单调拨*/ |
| | | @ApiOperation("订单调拨接口") |
| | | @PostMapping("/updateFinishedGoodsInventoryAllocate") |
| | | public Result updateFinishedGoodsInventoryAllocate( @RequestBody Map<String,Object> object){ |
| | | if(finishedGoodsInventoryService.updateFinishedGoodsInventoryAllocate(object)){ |
| | |
| | | } |
| | | |
| | | /*调拨记录查询*/ |
| | | @ApiOperation("调拨记录查询接口") |
| | | @PostMapping("/getselectAllocateFinishedOperateLog/{pageNum}/{pageSize}/{selectDate}") |
| | | public Result getselectAllocateFinishedOperateLog(@PathVariable Integer pageNum, @PathVariable Integer pageSize,@PathVariable List<String> selectDate, @RequestBody FinishedOperateLog finishedOperateLog){ |
| | | return Result.seccess(finishedGoodsInventoryService.getselectAllocateFinishedOperateLog(pageNum,pageSize,selectDate,finishedOperateLog)); |
| | | } |
| | | |
| | | /*订单领出*/ |
| | | @ApiOperation("订单领出接口") |
| | | @PostMapping("/updateFinishedGoodsInventoryTakeOut") |
| | | public Result updateFinishedGoodsInventoryTakeOut( @RequestBody Map<String,Object> object){ |
| | | |
| | |
| | | } |
| | | |
| | | /*领出记录查询*/ |
| | | @ApiOperation("领出记录查询接口") |
| | | @PostMapping("/getSelectOperateRecord/{pageNum}/{pageSize}/{selectDate}") |
| | | public Result getSelectOperateRecord(@PathVariable Integer pageNum, @PathVariable Integer pageSize,@PathVariable List<String> selectDate, @RequestBody FinishedOperateLog finishedOperateLog){ |
| | | return Result.seccess(finishedGoodsInventoryService.getSelectOperateRecord(pageNum,pageSize,selectDate,finishedOperateLog)); |
| | | } |
| | | |
| | | /*订单返工*/ |
| | | @ApiOperation("订单返工查询接口") |
| | | @PostMapping("/updateFinishedGoodsInventoryRework") |
| | | public Result updateFinishedGoodsInventoryRework( @RequestBody Map<String,Object> object){ |
| | | |
| | |
| | | |
| | | |
| | | /*订单审核*/ |
| | | @ApiOperation("订单审核接口") |
| | | @PostMapping("/updateFinishedGoodsInventoryToExamine") |
| | | public Result updateFinishedGoodsInventoryToExamine( @RequestBody Map<String,Object> object){ |
| | | |
| | |
| | | } |
| | | } |
| | | /*订单反审*/ |
| | | @ApiOperation("订单反审接口") |
| | | @PostMapping("/updateFinishedGoodsInventoryCounterexamination") |
| | | public Result updateFinishedGoodsInventoryCounterexamination( @RequestBody Map<String,Object> object){ |
| | | |
| | |
| | | public Result getBasicDataByType(@PathVariable String type){ |
| | | return Result.seccess(basicDateService.getBasicDataByType(type)); |
| | | } |
| | | @GetMapping("/BasicDataByType/{type}/{childType}") |
| | | public Result getBasicDataByTypeAndChildType(@PathVariable String type,@PathVariable String childType){ |
| | | return Result.seccess(basicDateService.getBasicDataByTypeAndChildType(type,childType)); |
| | | } |
| | | } |
| | |
| | | import com.example.erp.entity.sd.OrderDetail; |
| | | import com.example.erp.exception.ServiceException; |
| | | import com.example.erp.service.sd.DeliveryService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | |
| | | import java.util.Map; |
| | | |
| | | @RestController |
| | | @Api(value="发货controller",tags={"发货操作接口"}) |
| | | @RequestMapping("/Delivery") |
| | | public class DeliveryController { |
| | | @Autowired |
| | |
| | | |
| | | |
| | | /*发货订单查询*/ |
| | | @ApiOperation("发货订单查询接口") |
| | | @PostMapping("/getseletShippingOrder/{pageNum}/{pageSize}/{selectDate}") |
| | | public Result getseletShippingOrder(@PathVariable Integer pageNum, @PathVariable Integer pageSize,@PathVariable List<String> selectDate, @RequestBody Delivery delivery){ |
| | | return Result.seccess(deliveryService.getseletShippingOrder(pageNum,pageSize,selectDate,delivery)); |
| | | } |
| | | |
| | | /*发货订单明细查询*/ |
| | | @ApiOperation("发货编辑订单明细查询接口") |
| | | @PostMapping("/getseletShippingOrderDetail/{pageNum}/{pageSize}") |
| | | public Result getseletShippingOrderDetail(@PathVariable Integer pageNum, @PathVariable Integer pageSize, @RequestBody OrderDetail orderDetail){ |
| | | return Result.seccess(deliveryService.getseletShippingOrderDetail(pageNum,pageSize,orderDetail)); |
| | | } |
| | | |
| | | /*库存可发货订单查询*/ |
| | | @ApiOperation("库存可发货订单查询接口接口") |
| | | @PostMapping("/getSelectOrderInventory/{pageNum}/{pageSize}/{selectDate}") |
| | | public Result getSelectOrderInventory(@PathVariable Integer pageNum, @PathVariable Integer pageSize,@PathVariable List<String> selectDate, @RequestBody Order order){ |
| | | return Result.seccess(deliveryService.getSelectOrderInventory(pageNum,pageSize,selectDate,order)); |
| | | } |
| | | |
| | | /*发货订单明细查询*/ |
| | | @ApiOperation("发货新增订单明细查询接口") |
| | | @PostMapping("/getseletShippingOrderDetails/{pageNum}/{pageSize}") |
| | | public Result getseletShippingOrderDetails(@PathVariable Integer pageNum, @PathVariable Integer pageSize, @RequestBody OrderDetail orderDetail){ |
| | | return Result.seccess(deliveryService.getseletShippingOrderDetails(pageNum,pageSize,orderDetail)); |
| | | } |
| | | |
| | | @ApiOperation("发货新增接口") |
| | | @PostMapping("/insertDelivery") |
| | | public Result insertDelivery( @RequestBody Map<String,Object> object){ |
| | | if(deliveryService.insertDelivery(object)){ |
| | |
| | | |
| | | } |
| | | } |
| | | @ApiOperation("发货审核修改接口") |
| | | @PostMapping("/updateDeliveryToExamine") |
| | | public Result updateDeliveryToExamine( @RequestBody Map<String,Object> object){ |
| | | if(deliveryService.updateDeliveryToExamine(object)){ |
| | |
| | | import com.example.erp.common.Result; |
| | | import com.example.erp.entity.sd.Product; |
| | | import com.example.erp.service.sd.ProductService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.apache.ibatis.annotations.Delete; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | |
| | | import java.util.Map; |
| | | |
| | | @RestController |
| | | @Api(value="产品controller",tags={"产品操作接口"}) |
| | | @RequestMapping("/product") |
| | | public class ProductController { |
| | | @Autowired |
| | | ProductService productService; |
| | | |
| | | @ApiOperation("产品查询接口") |
| | | @PostMapping ("/{pageNum}/{pageSize}/{glassType}") |
| | | public Result defaultDateProduct(@PathVariable Integer pageNum, @PathVariable Integer pageSize, @PathVariable List<String> glassType, @RequestBody Product product){ |
| | | return Result.seccess(productService.defaultDateProduct(pageNum,pageSize,glassType,product)); |
| | | } |
| | | |
| | | @ApiOperation("产品保存接口") |
| | | @PostMapping("/saveProduct") |
| | | public Result saveProduct(@RequestBody Map<String,Object> product){ |
| | | return Result.seccess(productService.saveProduct(product)); |
| | | } |
| | | @ApiOperation("产品删除接口") |
| | | @PostMapping("/deleteProductById/{id}") |
| | | public Result deleteProductById(@PathVariable Integer id){ |
| | | return Result.seccess(productService.deleteProductById(id)); |
| | | } |
| | | |
| | | @ApiOperation("产品审核状态修改接口") |
| | | @PostMapping("/updateProductStateById/{id}/{state}") |
| | | public Result updateProductStateById(@PathVariable Integer id,@PathVariable Integer state){ |
| | | return Result.seccess(productService.updateProductStateById(id,state)); |
| | | } |
| | | @ApiOperation("根据产品id查询产品接口") |
| | | @PostMapping("/selectProductById/{id}") |
| | | public Result selectProductById(@PathVariable Integer id){ |
| | | return Result.seccess(productService.selectProductById(id)); |
| | | } |
| | | } |
| | |
| | | private String glassChild; |
| | | private Double childWidth; |
| | | private Double childHeight; |
| | | private Double area; |
| | | private Double totalArea; |
| | | private String icon; |
| | | private String process; |
| | | private String productionId; |
| | | private Integer splittingStatus; |
| | |
| | | package com.example.erp.entity.sd; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import lombok.Data; |
| | | |
| | |
| | | @TableId(type = IdType.AUTO) |
| | | private Long id; |
| | | private String productName; |
| | | private String typeId; |
| | | private String typeName; |
| | | private Double totalThickness; |
| | | private Double thickness; |
| | |
| | | private String creator; |
| | | private LocalDate createTime; |
| | | private LocalDate updateTime; |
| | | @TableField(select = false) |
| | | private BasicGlassType basicGlassType; |
| | | |
| | | } |
| | |
| | | package com.example.erp.entity.sd; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import lombok.Data; |
| | | |
| | |
| | | private String process; |
| | | private String separation; |
| | | private LocalDate createTime; |
| | | @TableField(select = false) |
| | | private Product product; |
| | | } |
| | |
| | | import org.springframework.data.repository.CrudRepository; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | @Mapper |
| | | public interface FinishedGoodsInventoryMapper extends CrudRepository<FinishedGoodsInventory,Long> { |
| | |
| | | @Param("pageSize") Integer pageSize, |
| | | @Param("finishedGoodsInventory") FinishedGoodsInventory finishedGoodsInventory); |
| | | |
| | | Integer getPageTotal(Integer offset, Integer pageSize,FinishedGoodsInventory finishedGoodsInventory); |
| | | Map<String,Integer> getPageTotal(Integer offset, Integer pageSize, FinishedGoodsInventory finishedGoodsInventory); |
| | | |
| | | List<FlowCard> getseletwarehousing(@Param("offset") Integer offset, |
| | | @Param("pageSize") Integer pageSize, |
| | | @Param("flowCard") FlowCard flowCard); |
| | | |
| | | Integer getseletwarehousingPageTotal(Integer offset, Integer pageSize,FlowCard flowCard); |
| | | Map<String,Integer> getseletwarehousingPageTotal(Integer offset, Integer pageSize,FlowCard flowCard); |
| | | |
| | | Integer findOrderNumberdcount(@Param("orderId") String orderId, |
| | | @Param("orderNumber") Integer orderNumber); |
| | |
| | | @Param("pageSize") Integer pageSize, |
| | | @Param("orderDetail") OrderDetail orderDetail); |
| | | |
| | | Integer getseletdeliveryDetailPageTotal(Integer offset, Integer pageSize,OrderDetail orderDetail); |
| | | Map<String,Integer> getseletdeliveryDetailPageTotal(Integer offset, Integer pageSize,OrderDetail orderDetail); |
| | | |
| | | List<OrderDetail> getSelectAllocate(@Param("offset") Integer offset, |
| | | @Param("pageSize") Integer pageSize, |
| | | @Param("orderDetail") OrderDetail orderDetail); |
| | | |
| | | Integer getSelectAllocatePageTotal(Integer offset, Integer pageSize,OrderDetail orderDetail); |
| | | Map<String,Integer> getSelectAllocatePageTotal(Integer offset, Integer pageSize,OrderDetail orderDetail); |
| | | |
| | | Boolean updateInventoryquantityAllocateOut(@Param("orderId") String orderId, |
| | | @Param("orderNumber") Integer orderNumber, |
| | |
| | | import org.springframework.data.repository.CrudRepository; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | @Mapper |
| | | public interface FinishedOperateLogMapper extends CrudRepository<FinishedOperateLog,Long> { |
| | |
| | | @Param("pageSize") Integer pageSize,String startDate, String endDate, |
| | | @Param("finishedOperateLog") FinishedOperateLog finishedOperateLog); |
| | | |
| | | Integer getselectAllocateFinishedOperateLogPageTotal(@Param("offset") Integer offset, |
| | | Map<String,Integer> getselectAllocateFinishedOperateLogPageTotal(@Param("offset") Integer offset, |
| | | @Param("pageSize") Integer pageSize,String startDate, String endDate, |
| | | @Param("finishedOperateLog") FinishedOperateLog finishedOperateLog); |
| | | |
| | |
| | | @Param("pageSize") Integer pageSize,String startDate, String endDate, |
| | | @Param("finishedOperateLog") FinishedOperateLog finishedOperateLog); |
| | | |
| | | Integer getSelectOperateRecordLogPageTotal(@Param("offset") Integer offset, |
| | | Map<String,Integer> getSelectOperateRecordLogPageTotal(@Param("offset") Integer offset, |
| | | @Param("pageSize") Integer pageSize,String startDate, String endDate, |
| | | @Param("finishedOperateLog") FinishedOperateLog finishedOperateLog); |
| | | |
| | |
| | | List<BasicData> getOrderBasicData(String type); |
| | | List<String> getOrderBasicDataType(String type); |
| | | |
| | | List<BasicData> getOrderBasicDataByTypeAndChildType(String type, String childType); |
| | | } |
| | |
| | | @Param("pageSize") Integer pageSize, |
| | | @Param("orderDetail") OrderDetail orderDetail); |
| | | |
| | | List<DeliveryDetail> getIsNotDeliveryDetail(@Param("deliveryDetailNumber") String deliveryDetailNumber,@Param("deliveryId") String deliveryId); |
| | | |
| | | |
| | | |
| | | Integer getseletShippingOrderDetailsPageTotal(Integer offset, Integer pageSize,OrderDetail orderDetail); |
| | |
| | | |
| | | Boolean updateOrderDetailDeliveryNum(OrderDetail orderDetail); |
| | | |
| | | Boolean updateIsNotOrderDetailDeliveryNum(@Param("orderId") String orderId, |
| | | @Param("orderNumber") Integer orderNumber, |
| | | @Param("quantity") Integer quantity); |
| | | |
| | | Boolean deleteDeliveryDetail(@Param("deliveryId") String deliveryId); |
| | | |
| | | } |
| | |
| | | import org.springframework.data.repository.CrudRepository; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | @Mapper |
| | | public interface DeliveryMapper extends CrudRepository<Delivery,Long> { |
| | |
| | | Order getseletShippingOrderDetaildeliverys(@Param("offset") Integer offset, |
| | | @Param("pageSize") Integer pageSize, |
| | | @Param("orderDetail") OrderDetail orderDetail); |
| | | Integer getseletShippingOrderPageTotal(Integer offset, Integer pageSize,String startDate, String endDate,Delivery delivery); |
| | | Map<String,Integer> getseletShippingOrderPageTotal(Integer offset, Integer pageSize, String startDate, String endDate, Delivery delivery); |
| | | |
| | | List<Order> getSelectOrderInventory(@Param("offset") Integer offset, |
| | | @Param("pageSize") Integer pageSize,String startDate, String endDate, |
| | | @Param("order") Order order); |
| | | |
| | | Integer getSelectOrderInventoryPageTotal(Integer offset, Integer pageSize,String startDate, String endDate, Order order); |
| | | Map<String,Integer> getSelectOrderInventoryPageTotal(Integer offset, Integer pageSize,String startDate, String endDate, Order order); |
| | | |
| | | Boolean insertDelivery(@Param("delivery") Delivery delivery,@Param("number") String number,@Param("orderId") String orderId); |
| | | |
| | | Integer getDeliveryConut(@Param("deliveryId") String deliveryId); |
| | | |
| | | Boolean updateDeliveryToExamine(@Param("deliveryId") String deliveryId,@Param("deliveryState") int deliveryState); |
| | | |
| | |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | package com.example.erp.mapper.sd; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.example.erp.entity.sd.ProductDetail; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Mapper |
| | | public interface ProductDetailMapper { |
| | | public interface ProductDetailMapper extends BaseMapper<ProductDetail> { |
| | | List<ProductDetail> getGlassDetailList(); |
| | | |
| | | boolean insertList(List<ProductDetail> getProductDetails); |
| | |
| | | @Param("product") Product product); |
| | | |
| | | Integer getPageTotal(Integer offset, Integer pageSize, String glassTypeId, Product product); |
| | | |
| | | boolean updateProductStateById(Integer id,Integer state); |
| | | } |
| | |
| | | import com.example.erp.entity.pp.FlowCard; |
| | | import com.example.erp.entity.sd.Order; |
| | | import com.example.erp.entity.sd.OrderDetail; |
| | | import com.example.erp.entity.userInfo.SysError; |
| | | import com.example.erp.mapper.mm.BasicWarehouseTypeMapper; |
| | | import com.example.erp.mapper.mm.FinishedGoodsInventoryMapper; |
| | | import com.example.erp.mapper.mm.FinishedOperateLogMapper; |
| | | import com.example.erp.service.userInfo.SysErrorService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.transaction.interceptor.TransactionAspectSupport; |
| | | |
| | | import java.sql.SQLException; |
| | | import java.text.SimpleDateFormat; |
| | |
| | | |
| | | @Service |
| | | @DS("mm") |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public class FinishedGoodsInventoryService { |
| | | @Autowired |
| | | FinishedGoodsInventoryMapper finishedGoodsInventoryMapper; |
| | |
| | | FinishedOperateLogMapper finishedOperateLogMapper; |
| | | @Autowired |
| | | BasicWarehouseTypeMapper basicWarehouseTypeMapper; |
| | | @Autowired |
| | | SysErrorService sysErrorService; |
| | | |
| | | public Map<String, Object> defaultDateFinishedGoodsInventory(Integer pageNum, Integer pageSize, FinishedGoodsInventory finishedGoodsInventory) { |
| | | Integer offset = (pageNum - 1) * pageSize; |
| | |
| | | |
| | | |
| | | public Boolean adddeliveryDetail(Map<String,Object> object) { |
| | | Boolean isinsert=false; |
| | | boolean saveState = true; |
| | | //设置回滚点 |
| | | Object savePoint = TransactionAspectSupport.currentTransactionStatus().createSavepoint(); |
| | | try { |
| | | String userName = ""; |
| | | String userId = ""; |
| | | if (object.get("userName") != null) { |
| | |
| | | //修改发货表状态 |
| | | finishedGoodsInventoryMapper.updateDeliveryDeliveryState(orderDetail.getDeliveryDetail().getDeliveryId(),2); |
| | | } |
| | | isinsert=true; |
| | | } |
| | | |
| | | } else { |
| | | isinsert=false; |
| | | } |
| | | } |
| | | return isinsert; |
| | | }else{ |
| | | return false; |
| | | } |
| | | |
| | | } catch (Exception e) { |
| | | TransactionAspectSupport.currentTransactionStatus().rollbackToSavepoint(savePoint); |
| | | //将异常传入数据库 |
| | | SysError sysError = new SysError(); |
| | | sysError.setError(e.toString()); |
| | | sysError.setFunc("saveOrder"); |
| | | sysErrorService.insert(sysError); |
| | | saveState = false; |
| | | |
| | | } |
| | | return saveState; |
| | | |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | public Boolean updateFinishedGoodsInventoryAllocate(Map<String,Object> object) { |
| | | Boolean isinsert=false; |
| | | boolean saveState = true; |
| | | //设置回滚点 |
| | | Object savePoint = TransactionAspectSupport.currentTransactionStatus().createSavepoint(); |
| | | try { |
| | | String userName = ""; |
| | | String userId = ""; |
| | | if (object.get("userName") != null) { |
| | |
| | | //修改订单表入库状态 |
| | | finishedGoodsInventoryMapper.updateOrderWarehousingState(orderDetail.getFinishedGoodsInventory().getOrderId(),1); |
| | | } |
| | | isinsert=true; |
| | | } |
| | | return isinsert; |
| | | }else{ |
| | | return false; |
| | | } |
| | | |
| | | } catch (Exception e) { |
| | | TransactionAspectSupport.currentTransactionStatus().rollbackToSavepoint(savePoint); |
| | | //将异常传入数据库 |
| | | SysError sysError = new SysError(); |
| | | sysError.setError(e.toString()); |
| | | sysError.setFunc("saveOrder"); |
| | | sysErrorService.insert(sysError); |
| | | saveState = false; |
| | | |
| | | } |
| | | return saveState; |
| | | |
| | | |
| | | } |
| | |
| | | } |
| | | |
| | | public Boolean updateFinishedGoodsInventoryTakeOut(Map<String,Object> object) { |
| | | Boolean isinsert=false; |
| | | boolean saveState = true; |
| | | //设置回滚点 |
| | | Object savePoint = TransactionAspectSupport.currentTransactionStatus().createSavepoint(); |
| | | try { |
| | | String userName = ""; |
| | | String userId = ""; |
| | | if (object.get("userName") != null) { |
| | |
| | | //修改订单表入库状态 |
| | | finishedGoodsInventoryMapper.updateOrderWarehousingState(orderDetail.getFinishedGoodsInventory().getOrderId(),1); |
| | | } |
| | | isinsert=true; |
| | | } |
| | | return isinsert; |
| | | }else{ |
| | | return false; |
| | | } |
| | | |
| | | } catch (Exception e) { |
| | | TransactionAspectSupport.currentTransactionStatus().rollbackToSavepoint(savePoint); |
| | | //将异常传入数据库 |
| | | SysError sysError = new SysError(); |
| | | sysError.setError(e.toString()); |
| | | sysError.setFunc("saveOrder"); |
| | | sysErrorService.insert(sysError); |
| | | saveState = false; |
| | | |
| | | } |
| | | return saveState; |
| | | |
| | | } |
| | | |
| | | /* public Map<String, Object> getselectTakeOutFinishedOperateLog(Integer pageNum, Integer pageSize, FinishedOperateLog finishedOperateLog) { |
| | | Integer offset = (pageNum - 1) * pageSize; |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("data", finishedOperateLogMapper.getselectAllocateFinishedOperateLog(offset, pageSize, finishedOperateLog)); |
| | | map.put("total", finishedOperateLogMapper.getselectAllocateFinishedOperateLogPageTotal(offset, pageSize, finishedOperateLog)); |
| | | return map; |
| | | }*/ |
| | | |
| | | public Map<String, Object> getSelectOperateRecord(Integer pageNum, Integer pageSize, List<String> selectDate, FinishedOperateLog finishedOperateLog) { |
| | | Integer offset = (pageNum-1)*pageSize; |
| | |
| | | |
| | | |
| | | public Boolean updateFinishedGoodsInventoryRework(Map<String,Object> object) { |
| | | Boolean isinsert=false; |
| | | boolean saveState = true; |
| | | //设置回滚点 |
| | | Object savePoint = TransactionAspectSupport.currentTransactionStatus().createSavepoint(); |
| | | try { |
| | | String userName = ""; |
| | | String userId = ""; |
| | | if (object.get("userName") != null) { |
| | |
| | | //修改订单表入库状态 |
| | | finishedGoodsInventoryMapper.updateOrderWarehousingState(orderDetail.getFinishedGoodsInventory().getOrderId(),1); |
| | | } |
| | | isinsert=true; |
| | | } |
| | | return isinsert; |
| | | }else{ |
| | | return false; |
| | | } |
| | | |
| | | } catch (Exception e) { |
| | | TransactionAspectSupport.currentTransactionStatus().rollbackToSavepoint(savePoint); |
| | | //将异常传入数据库 |
| | | SysError sysError = new SysError(); |
| | | sysError.setError(e.toString()); |
| | | sysError.setFunc("saveOrder"); |
| | | sysErrorService.insert(sysError); |
| | | saveState = false; |
| | | |
| | | } |
| | | return saveState; |
| | | |
| | | } |
| | | |
| | | |
| | | public Boolean updateFinishedGoodsInventoryToExamine(Map<String,Object> object,String type) { |
| | | Boolean isinsert=false; |
| | | boolean saveState = true; |
| | | //设置回滚点 |
| | | Object savePoint = TransactionAspectSupport.currentTransactionStatus().createSavepoint(); |
| | | try { |
| | | String userName = ""; |
| | | String userId = ""; |
| | | if (object.get("userName") != null) { |
| | |
| | | finishedGoodsInventoryMapper.updateInventoryInventoryInt(finishedOperateLog.getOrderId(),finishedOperateLog.getOperationNumber(),Math.toIntExact(finishedOperateLog.getQuantity())); |
| | | } |
| | | |
| | | |
| | | isinsert=true; |
| | | } |
| | | return isinsert; |
| | | }else{ |
| | | return false; |
| | | } |
| | | |
| | | } catch (Exception e) { |
| | | TransactionAspectSupport.currentTransactionStatus().rollbackToSavepoint(savePoint); |
| | | //将异常传入数据库 |
| | | SysError sysError = new SysError(); |
| | | sysError.setError(e.toString()); |
| | | sysError.setFunc("saveOrder"); |
| | | sysErrorService.insert(sysError); |
| | | saveState = false; |
| | | |
| | | } |
| | | return saveState; |
| | | |
| | | } |
| | | |
| | |
| | | public Map<String, List<Object>> getBasicDataByType(String type){ |
| | | List<String> orderBasicDataType = basicDateMapper.getOrderBasicDataType(type); |
| | | List<BasicData> orderBasicData = basicDateMapper.getOrderBasicData(type); |
| | | Map<String, List<Object>> BasicDataMap = new HashMap<>(); ; |
| | | Map<String, List<Object>> BasicDataMap = new HashMap<>(); |
| | | //创建List对象 |
| | | |
| | | //遍历订单基本数据类型 |
| | |
| | | } |
| | | return BasicDataMap; |
| | | } |
| | | |
| | | public List<BasicData> getBasicDataByTypeAndChildType(String type, String childType) { |
| | | Map<String, List<Object>> BasicDataMap = new HashMap<>(); |
| | | return basicDateMapper.getOrderBasicDataByTypeAndChildType(type, childType); |
| | | |
| | | } |
| | | } |
| | |
| | | import com.example.erp.entity.sd.DeliveryDetail; |
| | | import com.example.erp.entity.sd.Order; |
| | | import com.example.erp.entity.sd.OrderDetail; |
| | | import com.example.erp.entity.userInfo.SysError; |
| | | import com.example.erp.mapper.mm.FinishedGoodsInventoryMapper; |
| | | import com.example.erp.mapper.sd.DeliveryDetailMapper; |
| | | import com.example.erp.mapper.sd.DeliveryMapper; |
| | | import com.example.erp.mapper.sd.OrderDetailMapper; |
| | | import com.example.erp.mapper.sd.OrderMapper; |
| | | import com.example.erp.service.userInfo.SysErrorService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.transaction.interceptor.TransactionAspectSupport; |
| | | |
| | | import java.text.SimpleDateFormat; |
| | | import java.time.LocalDate; |
| | |
| | | |
| | | @Service |
| | | @DS("sd") |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public class DeliveryService { |
| | | @Autowired |
| | | DeliveryMapper deliveryMapper; |
| | |
| | | OrderDetailMapper orderDetailMapper; |
| | | @Autowired |
| | | FinishedGoodsInventoryMapper finishedGoodsInventoryMapper; |
| | | @Autowired |
| | | SysErrorService sysErrorService; |
| | | |
| | | |
| | | public Map<String, Object> getseletShippingOrder(Integer pageNum, Integer pageSize,List<String> selectDate, Delivery delivery) { |
| | | Integer offset = (pageNum - 1) * pageSize; |
| | |
| | | } |
| | | |
| | | public Boolean insertDelivery(Map<String,Object> object) { |
| | | Boolean isinsert=false; |
| | | |
| | | boolean saveState = true; |
| | | //设置回滚点 |
| | | Object savePoint = TransactionAspectSupport.currentTransactionStatus().createSavepoint(); |
| | | try { |
| | | |
| | | String deliveryId = ""; |
| | | String oddNumber; |
| | | if (object.get("deliveryId") != null) { |
| | | deliveryId = object.get("deliveryId").toString(); |
| | | } |
| | | Delivery delivery = JSONObject.parseObject(JSONObject.toJSONString(object.get("title")), Delivery.class); |
| | | List<OrderDetail> orderDetaillist = JSONArray.parseArray(JSONObject.toJSONString(object.get("delivery")), OrderDetail.class); |
| | | //查询发货单是否存在 |
| | | Integer deliveryConut = deliveryMapper.getDeliveryConut(deliveryId); |
| | | |
| | | if (deliveryConut != 0) { |
| | | //编辑还原数据 |
| | | String deliveryDetailNumber = ""; |
| | | if (!orderDetaillist.isEmpty()) { |
| | | for (OrderDetail orderDetail : orderDetaillist) { |
| | | if (orderDetaillist.size() - 1 == orderDetaillist.indexOf(orderDetail)) { |
| | | deliveryDetailNumber += orderDetail.getDeliveryDetail().getDeliveryNumber(); |
| | | } else { |
| | | deliveryDetailNumber += orderDetail.getDeliveryDetail().getDeliveryNumber() + "|"; |
| | | } |
| | | |
| | | } |
| | | } |
| | | List<DeliveryDetail> deliveryDetaillist = deliveryDetailMapper.getIsNotDeliveryDetail(deliveryDetailNumber, deliveryId); |
| | | if (!deliveryDetaillist.isEmpty()) { |
| | | for (DeliveryDetail deliveryDetail : deliveryDetaillist) { |
| | | //还原库存数以及订单明细的发货数 |
| | | finishedGoodsInventoryMapper.updateInventoryquantityInt(deliveryDetail.getOrderId(), deliveryDetail.getOrderNumber(), deliveryDetail.getQuantity()); |
| | | deliveryDetailMapper.updateIsNotOrderDetailDeliveryNum(deliveryDetail.getOrderId(), deliveryDetail.getOrderNumber(), deliveryDetail.getQuantity()); |
| | | } |
| | | } |
| | | //还原发货表的面积数量金额 |
| | | deliveryMapper.updatedelivery(0.0, 0, 0.0, deliveryId); |
| | | //删除发货明细的数据 |
| | | deliveryDetailMapper.deleteDeliveryDetail(deliveryId); |
| | | oddNumber = deliveryId; |
| | | } else { |
| | | //获取单号 |
| | | String oddNumber= orderNumberSetting("发货"); |
| | | oddNumber = orderNumberSetting("发货"); |
| | | //新增发货表数据 |
| | | deliveryMapper.insertDelivery(delivery,oddNumber,orderDetaillist.get(0).getOrderId()); |
| | | } |
| | | |
| | | Double area=0.0; |
| | | Integer quantity=0; |
| | | Double money=0.0; |
| | |
| | | |
| | | if (!orderDetaillist.isEmpty()){ |
| | | for (OrderDetail orderDetail : orderDetaillist) { |
| | | |
| | | quantity+=orderDetail.getDeliveryDetail().getQuantity(); |
| | | area+=orderDetail.getFinishedGoodsInventory().getActualSignalArea()*orderDetail.getDeliveryDetail().getQuantity(); |
| | | money+=orderDetail.getPrice()*orderDetail.getDeliveryDetail().getQuantity(); |
| | | Integer deliveryDetailmaximum=deliveryDetailMapper.getdeliveryDetailmaximum(oddNumber); |
| | | //新增发货明细数据 |
| | | deliveryDetailMapper.insertDeliveryDetail(orderDetail,oddNumber,deliveryDetailmaximum+1); |
| | | //修改订单明细 |
| | | deliveryDetailMapper.updateOrderDetailDeliveryNum(orderDetail); |
| | | //修改库存表出库数量 |
| | | finishedGoodsInventoryMapper.updateInventoryquantityOut(orderDetail.getOrderId(),orderDetail.getOrderNumber(),orderDetail.getDeliveryDetail().getQuantity()); |
| | | isinsert=true; |
| | | } |
| | | |
| | | } |
| | | //修改发货明细累加面积数量金额 |
| | | deliveryMapper.updatedelivery(Double.valueOf(String.format("%.2f", area)),quantity,Double.valueOf(String.format("%.2f", money)),oddNumber); |
| | | return isinsert; |
| | | |
| | | }else{ |
| | | return false; |
| | | } |
| | | } catch (Exception e) { |
| | | TransactionAspectSupport.currentTransactionStatus().rollbackToSavepoint(savePoint); |
| | | //将异常传入数据库 |
| | | SysError sysError = new SysError(); |
| | | sysError.setError(e.toString()); |
| | | sysError.setFunc("saveOrder"); |
| | | sysErrorService.insert(sysError); |
| | | saveState = false; |
| | | |
| | | |
| | | } |
| | | return saveState; |
| | | } |
| | | |
| | | |
| | |
| | | String alias=""; |
| | | if(Objects.equals(type, "发货")){ |
| | | alias="FH"; |
| | | }else if(Objects.equals(type, "出库")){ |
| | | alias="CK"; |
| | | }else if(Objects.equals(type, "调拨")){ |
| | | alias="DB"; |
| | | }else if(Objects.equals(type, "领出")){ |
| | | alias="LC"; |
| | | }else if(Objects.equals(type, "返工")){ |
| | | alias="FG"; |
| | | } |
| | | //查询当天的最大数量 |
| | | Integer maximum=deliveryMapper.getmaximum(type); |
| | |
| | | //工艺审核界面审核更新数据 |
| | | public boolean reviewProcessById(String id, Integer status,List<OrderGlassDetail> orderGlassDetails) { |
| | | if(!orderGlassDetails.isEmpty() && status==2){ |
| | | orderGlassDetails.forEach(orderGlassDetail ->{ |
| | | double area = Math.round((orderGlassDetail.getChildWidth()*orderGlassDetail.getChildHeight()/1000000) * 100) * 0.01d; |
| | | orderGlassDetail.setArea(area); |
| | | }); |
| | | |
| | | orderGlassDetailMapper.updateSizeAndProcess(orderGlassDetails); |
| | | orderProcessDetailMapper.delete(new QueryWrapper<OrderProcessDetail>().eq("order_id",id)); |
| | | //查询订单小片表获取工艺传入小片工艺表 |
| | |
| | | package com.example.erp.service.sd; |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.alibaba.fastjson.parser.Feature; |
| | | import com.baomidou.dynamic.datasource.annotation.DS; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; |
| | | import com.example.erp.common.Constants; |
| | | import com.example.erp.entity.sd.Product; |
| | | import com.example.erp.entity.sd.ProductDetail; |
| | | import com.example.erp.exception.ServiceException; |
| | | import com.example.erp.mapper.sd.ProductDetailMapper; |
| | | import com.example.erp.mapper.sd.ProductMapper; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import java.text.DecimalFormat; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.Objects; |
| | | import java.util.*; |
| | | |
| | | @Service |
| | | @DS("sd") |
| | |
| | | JSONObject productJson = new JSONObject(productObject); |
| | | Product product = JSONObject.parseObject(JSONObject.toJSONString(productJson.get("title")), Product.class); |
| | | List<ProductDetail> productDetails = JSONArray.parseArray(JSONObject.toJSONString(productJson.get("detail")), ProductDetail.class); |
| | | |
| | | System.out.println(product); |
| | | //完善主附表信息并返回 |
| | | Map<String,Object> getProductJson = updateProduct(productDetails,product); |
| | | Product getProduct = JSONObject.parseObject(JSONObject.toJSONString(getProductJson.get("title")), Product.class); |
| | | List<ProductDetail> getProductDetails = JSONArray.parseArray(JSONObject.toJSONString(getProductJson.get("detail")), ProductDetail.class); |
| | | |
| | | if(getProduct.getId()==null ){ |
| | | insertProduct(getProduct,getProductDetails); |
| | | }else{ |
| | | updateProductData(getProductDetails,getProduct); |
| | | } |
| | | return true; |
| | | |
| | | } |
| | | |
| | | private void updateProductData(List<ProductDetail> getProductDetails, Product getProduct) { |
| | | productMapper.update(getProduct,new UpdateWrapper<Product>().eq("id",getProduct.getId())); |
| | | productDetailMapper.delete(new QueryWrapper<ProductDetail>().eq("prod_id",getProduct.getId())); |
| | | for (ProductDetail getProductDetail : getProductDetails) { |
| | | getProductDetail.setProdId(getProduct.getId()); |
| | | } |
| | | productDetailMapper.insertList(getProductDetails); |
| | | } |
| | | |
| | | private void insertProduct(Product getProduct, List<ProductDetail> getProductDetails) { |
| | | //插入主表数据 |
| | | productMapper.insert(getProduct); |
| | | //给副表添加产品id |
| | |
| | | } |
| | | //插入副表 |
| | | productDetailMapper.insertList(getProductDetails); |
| | | |
| | | return false; |
| | | |
| | | } |
| | | |
| | | private Map<String,Object> updateProduct(List<ProductDetail> productDetailList,Product product) { |
| | |
| | | for (ProductDetail productDetail : productDetailList) { |
| | | sortNum+=1; |
| | | productDetail.setSortNum(sortNum); |
| | | |
| | | JSONObject separation = JSONObject.parseObject( productDetail.getSeparation()); |
| | | JSONObject separation = JSONObject.parseObject(productDetail.getSeparation(), Feature.OrderedField); |
| | | String getThickness = (String) separation.get("thickness"); |
| | | double thicknessDetail = Double.parseDouble(getThickness.replace("mm","")); |
| | | totalThickness += thicknessDetail; |
| | |
| | | map.put("detail",productDetailList); |
| | | return map; |
| | | } |
| | | |
| | | public boolean deleteProductById(Integer id) { |
| | | Product product = productMapper.selectById(id); |
| | | if(product.getState()==1){ |
| | | throw new ServiceException(Constants.Code_600,"产品已审核,无法删除"); |
| | | } |
| | | productMapper.deleteById(id); |
| | | return true; |
| | | } |
| | | |
| | | public boolean updateProductStateById(Integer id,Integer state) { |
| | | return productMapper.updateProductStateById(id,state); |
| | | } |
| | | |
| | | public Map<String,Object> selectProductById(Integer id) { |
| | | Product product = productMapper.selectById(id); |
| | | List<ProductDetail> productDetailList = productDetailMapper.selectList( |
| | | new QueryWrapper<ProductDetail>().eq("prod_id", id)); |
| | | Map<String,Object> map = new HashMap<>(); |
| | | map.put("title",product); |
| | | map.put("detail",productDetailList); |
| | | return map; |
| | | } |
| | | } |
| | |
| | | </select> |
| | | |
| | | <select id="getSelectAllocatePageTotal" > |
| | | select CEILING(count(zu.order_number)/#{pageSize}) from |
| | | select CEILING(count(zu.order_number)/#{pageSize}) as 'pageTotal', |
| | | count(zu.order_number) as 'total' from |
| | | (select fgi.order_number as order_number |
| | | from mm.finished_goods_inventory fgi |
| | | left join sd.order_detail od on fgi.order_id = od.order_id and fgi.order_number = od.order_number |
| | |
| | | |
| | | |
| | | <select id="getseletdeliveryDetailPageTotal" > |
| | | select CEILING(count(dd.id)/#{pageSize}) |
| | | select CEILING(count(dd.id)/#{pageSize}) as 'pageTotal', |
| | | count(dd.id) as 'total' |
| | | from sd.delivery_detail dd |
| | | left join sd.delivery d on dd.delivery_id = d.delivery_id |
| | | left join sd.order_detail od on od.order_id = dd.order_id and dd.order_number = od.order_number |
| | | left join sd.`order` o on o.order_id = dd.order_id |
| | | <where> |
| | | and dd.delivery_detail_state=1 |
| | | <if test="orderDetail.deliveryDetail.deliveryId != null and orderDetail.deliveryDetail.deliveryId != ''"> |
| | | and dd.delivery_id regexp #{orderDetail.deliveryDetail.deliveryId} |
| | | </if> |
| | |
| | | from sd.delivery_detail dd |
| | | left join sd.delivery d on dd.delivery_id = d.delivery_id |
| | | left join sd.order_detail od on od.order_id = dd.order_id and dd.order_number = od.order_number |
| | | left join sd.`order` o on o.order_id = dd.order_id where dd.delivery_detail_state=1 |
| | | left join sd.`order` o on o.order_id = dd.order_id |
| | | |
| | | <where> |
| | | and dd.delivery_detail_state=1 |
| | | <if test="orderDetail.deliveryDetail.deliveryId != null and orderDetail.deliveryDetail.deliveryId != ''"> |
| | | and dd.delivery_id regexp #{orderDetail.deliveryDetail.deliveryId} |
| | | </if> |
| | |
| | | limit #{offset},#{pageSize}; |
| | | </select> |
| | | <select id="getseletwarehousingPageTotal" > |
| | | select CEILING(count(zu.order_number)/#{pageSize}) from ( |
| | | CEILING(count(zu.order_number)/#{pageSize}) as 'pageTotal', |
| | | count(zu.order_number) as 'total' from ( |
| | | select fc.order_number as order_number,fc.process_id from pp.flow_card fc left join sd.order_detail od on |
| | | fc.order_id=od.order_id and fc.order_number=od.order_number inner join sd.`order` o on o.order_id=fc.order_id |
| | | <where> |
| | |
| | | |
| | | <select id="getPageTotal"> |
| | | select |
| | | CEILING(count(fgi.id)/#{pageSize}) |
| | | CEILING(count(fgi.id)/#{pageSize}) as 'pageTotal', |
| | | count(fgi.id) as 'total' |
| | | from finished_goods_inventory fgi |
| | | left join sd.order_detail od on fgi.order_id = od.order_id and fgi.order_number = od.order_number |
| | | left join sd.`order` o on fgi.order_id = o.order_id |
| | |
| | | </select> |
| | | |
| | | <select id="getSelectOperateRecordLogPageTotal" > |
| | | select CEILING(count(fol.id)/#{pageSize}) |
| | | select CEILING(count(fol.id)/#{pageSize}) as 'pageTotal', |
| | | count(fol.id) as 'total' |
| | | from (select * |
| | | from mm.finished_operate_log aa where aa.operate_type = '领出' or aa.operate_type = '返工') fol |
| | | left join sd.order_detail od on fol.order_id = od.order_id and fol.operation_number = od.order_number |
| | |
| | | </select> |
| | | |
| | | <select id="getselectAllocateFinishedOperateLogPageTotal" > |
| | | select CEILING(count(fol.id)/#{pageSize}) |
| | | select CEILING(count(fol.id)/#{pageSize}) as 'pageTotal', |
| | | count(fol.id) as 'total' |
| | | from (select * |
| | | from mm.finished_operate_log aa where aa.operate_type = '调拨') fol |
| | | left join sd.order_detail od on fol.order_id = od.order_id and fol.end_operation_order_number = od.order_number |
| | |
| | | basic_data as a |
| | | where a.basic_type=#{type} |
| | | </select> |
| | | <select id="getOrderBasicDataByTypeAndChildType"> |
| | | select |
| | | * |
| | | from |
| | | basic_data as a |
| | | where a.basic_type=#{type} and a.basic_category = #{childType} |
| | | </select> |
| | | |
| | | <select id="getOrderBasicDataType"> |
| | | select |
| | | a.basic_category |
| | |
| | | update sd.delivery set area=#{area},quantity=#{quantity},money=#{money} where delivery_id=#{oddNumber} |
| | | </update> |
| | | |
| | | |
| | | <select id="getmaximum" > |
| | | select count(*) from sd.delivery where date(create_time)=CURDATE() |
| | | </select> |
| | | |
| | | <select id="getDeliveryConut" > |
| | | select count(*) from sd.delivery where delivery_id=#{deliveryId} |
| | | </select> |
| | | |
| | | |
| | |
| | | </select> |
| | | |
| | | <select id="getSelectOrderInventoryPageTotal" > |
| | | select CEILING(count(zu.order_id)/#{pageSize}) from |
| | | select CEILING(count(zu.order_id)/#{pageSize}) as 'pageTotal', |
| | | count(zu.order_id) as 'total' from |
| | | (select o.create_order,o.process_review,o.order_review,o.production_order, |
| | | o.processing_card,o.warehousing,o.delivery,o.order_id,o.customer_id, |
| | | o.customer_name,o.quantity,sum(fgi.quantity_available),o.project,o.batch, |
| | |
| | | and fgi.quantity_available REGEXP #{order.finishedGoodsInventory.quantityAvailable} |
| | | </if> |
| | | </where> |
| | | group by o.order_id) as zu |
| | | limit #{offset},#{pageSize}; |
| | | group by o.order_id limit #{offset},#{pageSize}) as zu; |
| | | |
| | | |
| | | |
| | |
| | | |
| | | |
| | | <select id="getseletShippingOrderDetaildeliverys" > |
| | | select customer_id,customer_name,project,salesman,salesman_id from sd.`order` |
| | | select customer_id,customer_name,project,salesman,salesman_id,contacts,contact_number,delivery_address from sd.`order` |
| | | <where> |
| | | <if test="orderDetail.orderId != null and orderDetail.orderId != ''"> |
| | | and order_id regexp #{orderDetail.orderId} |
| | |
| | | |
| | | <select id="getseletShippingOrderPageTotal"> |
| | | select |
| | | CEILING(count(id)/#{pageSize}) |
| | | CEILING(count(id)/#{pageSize}) as 'pageTotal', |
| | | count(id) as 'total' |
| | | from sd.delivery d |
| | | <where> |
| | | date(d.create_time)>=#{startDate} and date(d.create_time) <= #{endDate} |
| | |
| | | |
| | | <result column="d_quantity" property="deliveryDetail.quantity"/> |
| | | <result column="money" property="deliveryDetail.money"/> |
| | | <result column="delivery_number" property="deliveryDetail.deliveryNumber"/> |
| | | <result column="delivery_detail_remakes" property="deliveryDetail.deliveryDetailRemakes"/> |
| | | |
| | | <result column="batch" property="order.batch"/> |
| | |
| | | |
| | | </resultMap> |
| | | |
| | | <delete id="deleteDeliveryDetail"> |
| | | delete from sd.delivery_detail where delivery_id=#{deliveryId} |
| | | </delete> |
| | | |
| | | <update id="updateOrderDetailDeliveryNum"> |
| | | update sd.order_detail set delivery_num=#{deliveryDetail.quantity} where order_id=#{orderId} and order_number=#{orderNumber} |
| | | </update> |
| | | |
| | | <update id="updateIsNotOrderDetailDeliveryNum"> |
| | | update sd.order_detail set delivery_num=delivery_num-#{quantity} where order_id=#{orderId} and order_number=#{orderNumber} |
| | | </update> |
| | | |
| | | <select id="getdeliveryDetailmaximum" > |
| | | select count(*) from sd.delivery_detail where delivery_id=#{deliveryId} |
| | | </select> |
| | | |
| | | <select id="getIsNotDeliveryDetail" > |
| | | select * from sd.delivery_detail where delivery_id=#{deliveryId} |
| | | </select> |
| | | |
| | | |
| | |
| | | insert into sd.delivery_detail (delivery_id,delivery_number,order_number, |
| | | area,order_id,quantity,money,delivery_detail_remakes,delivery_detail_state,create_time) |
| | | values ( |
| | | #{number} ,#{deliveryNumber},#{orderDetail.orderNumber},#{orderDetail.computeGrossArea}, |
| | | #{number} ,#{deliveryNumber},#{orderDetail.order_number},#{orderDetail.computeGrossArea}, |
| | | #{orderDetail.orderId},#{orderDetail.deliveryDetail.quantity}, |
| | | #{orderDetail.price}*#{orderDetail.deliveryDetail.quantity},'',1,now() |
| | | ) |
| | |
| | | |
| | | |
| | | <select id="getseletShippingOrderDetail" resultMap="selectDeliveryFinishedGoodsInventoryOrderDetail"> |
| | | select od.order_id,o.batch,fgi.quantity_available,od.quantity-dd.quantity as t_quantity,od.quantity as o_quantity,dd.quantity |
| | | as d_quantity,od.building_number,od.product_id,od.product_name,od.price,fgi.storage_region,dd.money,od.width, |
| | | od.height,od.shape,fgi.actual_signal_area,od.gross_area,od.compute_area,od.compute_gross_area, |
| | | od.processing_note,od.edging_type,od.perimeter,dd.delivery_detail_remakes |
| | | select od.order_id, |
| | | o.batch, |
| | | dd.delivery_number, |
| | | fgi.quantity_available + dd.quantity as quantity_available, |
| | | od.order_number, |
| | | od.quantity-dd.quantity as t_quantity, |
| | | od.quantity as o_quantity, |
| | | dd.quantity as d_quantity, |
| | | od.building_number, |
| | | od.product_id, |
| | | od.product_name, |
| | | od.price, |
| | | fgi.storage_region, |
| | | dd.money, |
| | | od.width, |
| | | od.height, |
| | | od.shape, |
| | | fgi.actual_signal_area, |
| | | od.gross_area, |
| | | od.compute_area, |
| | | od.compute_gross_area, |
| | | od.processing_note, |
| | | od.edging_type, |
| | | od.perimeter, |
| | | dd.delivery_detail_remakes |
| | | from sd.delivery_detail dd |
| | | left join sd.delivery d on dd.delivery_id=d.delivery_id |
| | | left join sd.order_detail od on dd.order_id=od.order_id and dd.order_number=od.order_number |
| | |
| | | glass_child, |
| | | child_width, |
| | | child_height, |
| | | area, |
| | | total_area, |
| | | |
| | | process, |
| | | `group`) |
| | | select |
| | |
| | | pd.detail, |
| | | od.width, |
| | | od.height, |
| | | od.area, |
| | | od.gross_area, |
| | | pd.process, |
| | | pd.glass_group |
| | | from sd.product_detail as pd |
| | |
| | | <result column="glass_child" property="glassChild"/> |
| | | <result column="child_width" property="childWidth"/> |
| | | <result column="child_height" property="childHeight"/> |
| | | <result column="icon" property="icon"/> |
| | | <result column="process" property="process"/> |
| | | <result column="area" property="area"/> |
| | | <result column="total_area" property="totalArea"/> |
| | | <!--接收其他外键实体类数据--> |
| | | <association property="orderDetail" javaType="com.example.erp.entity.sd.OrderDetail"> |
| | | |
| | | <result column="building_number" property="buildingNumber"/> |
| | | |
| | | <result column="product_name" property="productName"/> |
| | | <result column="width" property="width"/> |
| | | <result column="height" property="height"/> |
| | | <result column="shape" property="shape"/> |
| | | <result column="gross_area" property="grossArea"/> |
| | | <result column="edging_type" property="edgingType"/> |
| | | <result column="area" property="area"/> |
| | | <result column="quantity" property="quantity"/> |
| | | <result column="processing_note" property="processingNote"/> |
| | | <result column="beizhu" property="remarks"/> |
| | |
| | | b.width, |
| | | b.height, |
| | | b.shape, |
| | | b.gross_area, |
| | | a.total_area, |
| | | b.edging_type, |
| | | a.child_width, |
| | | a.child_height, |
| | | b.area, |
| | | a.icon, |
| | | a.area, |
| | | b.quantity, |
| | | a.process, |
| | | b.remarks as 'beizhu', |
| | |
| | | |
| | | <update id="updateSizeAndProcess" parameterType="java.util.List"> |
| | | <foreach collection="orderGlassDetails" item="item" index="index" open="" close="" separator=";"> |
| | | update order_glass_detail |
| | | update order_glass_detail as a, |
| | | order_detail as b |
| | | set |
| | | child_width = #{item.childWidth}, |
| | | child_height = #{item.childHeight}, |
| | | process = #{item.process} |
| | | a.child_width = #{item.childWidth}, |
| | | a.child_height = #{item.childHeight}, |
| | | a.area = #{item.area}, |
| | | a.total_area = #{item.area}*b.quantity, |
| | | a.icon = #{item.icon}, |
| | | a.process = #{item.process} |
| | | where |
| | | order_id = #{item.orderId} |
| | | and order_number = #{item.orderNumber} |
| | | and technology_number = #{item.technologyNumber} |
| | | a.order_id = b.order_id |
| | | and a.order_id = #{item.orderId} |
| | | and a.order_number = #{item.orderNumber} |
| | | and a.technology_number = #{item.technologyNumber} |
| | | </foreach> |
| | | |
| | | </update> |
| | |
| | | limit #{offset},#{pageSize} |
| | | ; |
| | | </select> |
| | | |
| | | <update id="updateProductStateById"> |
| | | update product set state = #{state} where id = #{id} |
| | | </update> |
| | | </mapper> |
| | |
| | | </select> |
| | | |
| | | <select id="getSelectAllocatePageTotal" > |
| | | select CEILING(count(zu.order_number)/#{pageSize}) from |
| | | select CEILING(count(zu.order_number)/#{pageSize}) as 'pageTotal', |
| | | count(zu.order_number) as 'total' from |
| | | (select fgi.order_number as order_number |
| | | from mm.finished_goods_inventory fgi |
| | | left join sd.order_detail od on fgi.order_id = od.order_id and fgi.order_number = od.order_number |
| | |
| | | |
| | | |
| | | <select id="getseletdeliveryDetailPageTotal" > |
| | | select CEILING(count(dd.id)/#{pageSize}) |
| | | select CEILING(count(dd.id)/#{pageSize}) as 'pageTotal', |
| | | count(dd.id) as 'total' |
| | | from sd.delivery_detail dd |
| | | left join sd.delivery d on dd.delivery_id = d.delivery_id |
| | | left join sd.order_detail od on od.order_id = dd.order_id and dd.order_number = od.order_number |
| | | left join sd.`order` o on o.order_id = dd.order_id |
| | | <where> |
| | | and dd.delivery_detail_state=1 |
| | | <if test="orderDetail.deliveryDetail.deliveryId != null and orderDetail.deliveryDetail.deliveryId != ''"> |
| | | and dd.delivery_id regexp #{orderDetail.deliveryDetail.deliveryId} |
| | | </if> |
| | |
| | | from sd.delivery_detail dd |
| | | left join sd.delivery d on dd.delivery_id = d.delivery_id |
| | | left join sd.order_detail od on od.order_id = dd.order_id and dd.order_number = od.order_number |
| | | left join sd.`order` o on o.order_id = dd.order_id where dd.delivery_detail_state=1 |
| | | left join sd.`order` o on o.order_id = dd.order_id |
| | | |
| | | <where> |
| | | and dd.delivery_detail_state=1 |
| | | <if test="orderDetail.deliveryDetail.deliveryId != null and orderDetail.deliveryDetail.deliveryId != ''"> |
| | | and dd.delivery_id regexp #{orderDetail.deliveryDetail.deliveryId} |
| | | </if> |
| | |
| | | limit #{offset},#{pageSize}; |
| | | </select> |
| | | <select id="getseletwarehousingPageTotal" > |
| | | select CEILING(count(zu.order_number)/#{pageSize}) from ( |
| | | CEILING(count(zu.order_number)/#{pageSize}) as 'pageTotal', |
| | | count(zu.order_number) as 'total' from ( |
| | | select fc.order_number as order_number,fc.process_id from pp.flow_card fc left join sd.order_detail od on |
| | | fc.order_id=od.order_id and fc.order_number=od.order_number inner join sd.`order` o on o.order_id=fc.order_id |
| | | <where> |
| | |
| | | |
| | | <select id="getPageTotal"> |
| | | select |
| | | CEILING(count(fgi.id)/#{pageSize}) |
| | | CEILING(count(fgi.id)/#{pageSize}) as 'pageTotal', |
| | | count(fgi.id) as 'total' |
| | | from finished_goods_inventory fgi |
| | | left join sd.order_detail od on fgi.order_id = od.order_id and fgi.order_number = od.order_number |
| | | left join sd.`order` o on fgi.order_id = o.order_id |
| | |
| | | </select> |
| | | |
| | | <select id="getSelectOperateRecordLogPageTotal" > |
| | | select CEILING(count(fol.id)/#{pageSize}) |
| | | select CEILING(count(fol.id)/#{pageSize}) as 'pageTotal', |
| | | count(fol.id) as 'total' |
| | | from (select * |
| | | from mm.finished_operate_log aa where aa.operate_type = '领出' or aa.operate_type = '返工') fol |
| | | left join sd.order_detail od on fol.order_id = od.order_id and fol.operation_number = od.order_number |
| | |
| | | </select> |
| | | |
| | | <select id="getselectAllocateFinishedOperateLogPageTotal" > |
| | | select CEILING(count(fol.id)/#{pageSize}) |
| | | select CEILING(count(fol.id)/#{pageSize}) as 'pageTotal', |
| | | count(fol.id) as 'total' |
| | | from (select * |
| | | from mm.finished_operate_log aa where aa.operate_type = '调拨') fol |
| | | left join sd.order_detail od on fol.order_id = od.order_id and fol.end_operation_order_number = od.order_number |
| | |
| | | p.thickness, |
| | | od.weight |
| | | from |
| | | |
| | | sd.order_detail as od |
| | | left join sd.order_glass_detail as ogd on od.order_id=ogd.order_id and od.order_number=ogd.order_number |
| | | left join sd.product as p on od.product_name=p.product_name |
| | |
| | | basic_data as a |
| | | where a.basic_type=#{type} |
| | | </select> |
| | | <select id="getOrderBasicDataByTypeAndChildType"> |
| | | select |
| | | * |
| | | from |
| | | basic_data as a |
| | | where a.basic_type=#{type} and a.basic_category = #{childType} |
| | | </select> |
| | | |
| | | <select id="getOrderBasicDataType"> |
| | | select |
| | | a.basic_category |
| | |
| | | update sd.delivery set area=#{area},quantity=#{quantity},money=#{money} where delivery_id=#{oddNumber} |
| | | </update> |
| | | |
| | | |
| | | <select id="getmaximum" > |
| | | select count(*) from sd.delivery where date(create_time)=CURDATE() |
| | | </select> |
| | | |
| | | <select id="getDeliveryConut" > |
| | | select count(*) from sd.delivery where delivery_id=#{deliveryId} |
| | | </select> |
| | | |
| | | |
| | |
| | | </select> |
| | | |
| | | <select id="getSelectOrderInventoryPageTotal" > |
| | | select CEILING(count(zu.order_id)/#{pageSize}) from |
| | | select CEILING(count(zu.order_id)/#{pageSize}) as 'pageTotal', |
| | | count(zu.order_id) as 'total' from |
| | | (select o.create_order,o.process_review,o.order_review,o.production_order, |
| | | o.processing_card,o.warehousing,o.delivery,o.order_id,o.customer_id, |
| | | o.customer_name,o.quantity,sum(fgi.quantity_available),o.project,o.batch, |
| | |
| | | and fgi.quantity_available REGEXP #{order.finishedGoodsInventory.quantityAvailable} |
| | | </if> |
| | | </where> |
| | | group by o.order_id) as zu |
| | | limit #{offset},#{pageSize}; |
| | | group by o.order_id limit #{offset},#{pageSize}) as zu; |
| | | |
| | | |
| | | |
| | |
| | | |
| | | |
| | | <select id="getseletShippingOrderDetaildeliverys" > |
| | | select customer_id,customer_name,project,salesman,salesman_id from sd.`order` |
| | | select customer_id,customer_name,project,salesman,salesman_id,contacts,contact_number,delivery_address from sd.`order` |
| | | <where> |
| | | <if test="orderDetail.orderId != null and orderDetail.orderId != ''"> |
| | | and order_id regexp #{orderDetail.orderId} |
| | |
| | | |
| | | <select id="getseletShippingOrderPageTotal"> |
| | | select |
| | | CEILING(count(id)/#{pageSize}) |
| | | CEILING(count(id)/#{pageSize}) as 'pageTotal', |
| | | count(id) as 'total' |
| | | from sd.delivery d |
| | | <where> |
| | | date(d.create_time)>=#{startDate} and date(d.create_time) <= #{endDate} |
| | |
| | | |
| | | <result column="d_quantity" property="deliveryDetail.quantity"/> |
| | | <result column="money" property="deliveryDetail.money"/> |
| | | <result column="delivery_number" property="deliveryDetail.deliveryNumber"/> |
| | | <result column="delivery_detail_remakes" property="deliveryDetail.deliveryDetailRemakes"/> |
| | | |
| | | <result column="batch" property="order.batch"/> |
| | |
| | | |
| | | </resultMap> |
| | | |
| | | <delete id="deleteDeliveryDetail"> |
| | | delete from sd.delivery_detail where delivery_id=#{deliveryId} |
| | | </delete> |
| | | |
| | | <update id="updateOrderDetailDeliveryNum"> |
| | | update sd.order_detail set delivery_num=#{deliveryDetail.quantity} where order_id=#{orderId} and order_number=#{orderNumber} |
| | | </update> |
| | | |
| | | <update id="updateIsNotOrderDetailDeliveryNum"> |
| | | update sd.order_detail set delivery_num=delivery_num-#{quantity} where order_id=#{orderId} and order_number=#{orderNumber} |
| | | </update> |
| | | |
| | | <select id="getdeliveryDetailmaximum" > |
| | | select count(*) from sd.delivery_detail where delivery_id=#{deliveryId} |
| | | </select> |
| | | |
| | | <select id="getIsNotDeliveryDetail" > |
| | | select * from sd.delivery_detail where delivery_id=#{deliveryId} |
| | | </select> |
| | | |
| | | |
| | |
| | | insert into sd.delivery_detail (delivery_id,delivery_number,order_number, |
| | | area,order_id,quantity,money,delivery_detail_remakes,delivery_detail_state,create_time) |
| | | values ( |
| | | #{number} ,#{deliveryNumber},#{orderDetail.orderNumber},#{orderDetail.computeGrossArea}, |
| | | #{number} ,#{deliveryNumber},#{orderDetail.order_number},#{orderDetail.computeGrossArea}, |
| | | #{orderDetail.orderId},#{orderDetail.deliveryDetail.quantity}, |
| | | #{orderDetail.price}*#{orderDetail.deliveryDetail.quantity},'',1,now() |
| | | ) |
| | |
| | | |
| | | |
| | | <select id="getseletShippingOrderDetail" resultMap="selectDeliveryFinishedGoodsInventoryOrderDetail"> |
| | | select od.order_id,o.batch,fgi.quantity_available,od.quantity-dd.quantity as t_quantity,od.quantity as o_quantity,dd.quantity |
| | | as d_quantity,od.building_number,od.product_id,od.product_name,od.price,fgi.storage_region,dd.money,od.width, |
| | | od.height,od.shape,fgi.actual_signal_area,od.gross_area,od.compute_area,od.compute_gross_area, |
| | | od.processing_note,od.edging_type,od.perimeter,dd.delivery_detail_remakes |
| | | select od.order_id, |
| | | o.batch, |
| | | dd.delivery_number, |
| | | fgi.quantity_available + dd.quantity as quantity_available, |
| | | od.order_number, |
| | | od.quantity-dd.quantity as t_quantity, |
| | | od.quantity as o_quantity, |
| | | dd.quantity as d_quantity, |
| | | od.building_number, |
| | | od.product_id, |
| | | od.product_name, |
| | | od.price, |
| | | fgi.storage_region, |
| | | dd.money, |
| | | od.width, |
| | | od.height, |
| | | od.shape, |
| | | fgi.actual_signal_area, |
| | | od.gross_area, |
| | | od.compute_area, |
| | | od.compute_gross_area, |
| | | od.processing_note, |
| | | od.edging_type, |
| | | od.perimeter, |
| | | dd.delivery_detail_remakes |
| | | from sd.delivery_detail dd |
| | | left join sd.delivery d on dd.delivery_id=d.delivery_id |
| | | left join sd.order_detail od on dd.order_id=od.order_id and dd.order_number=od.order_number |
| | |
| | | glass_child, |
| | | child_width, |
| | | child_height, |
| | | area, |
| | | total_area, |
| | | |
| | | process, |
| | | `group`) |
| | | select |
| | |
| | | pd.detail, |
| | | od.width, |
| | | od.height, |
| | | od.area, |
| | | od.gross_area, |
| | | pd.process, |
| | | pd.glass_group |
| | | from sd.product_detail as pd |
| | |
| | | <result column="glass_child" property="glassChild"/> |
| | | <result column="child_width" property="childWidth"/> |
| | | <result column="child_height" property="childHeight"/> |
| | | <result column="icon" property="icon"/> |
| | | <result column="process" property="process"/> |
| | | <result column="area" property="area"/> |
| | | <result column="total_area" property="totalArea"/> |
| | | <!--接收其他外键实体类数据--> |
| | | <association property="orderDetail" javaType="com.example.erp.entity.sd.OrderDetail"> |
| | | |
| | | <result column="building_number" property="buildingNumber"/> |
| | | |
| | | <result column="product_name" property="productName"/> |
| | | <result column="width" property="width"/> |
| | | <result column="height" property="height"/> |
| | | <result column="shape" property="shape"/> |
| | | <result column="gross_area" property="grossArea"/> |
| | | <result column="edging_type" property="edgingType"/> |
| | | <result column="area" property="area"/> |
| | | <result column="quantity" property="quantity"/> |
| | | <result column="processing_note" property="processingNote"/> |
| | | <result column="beizhu" property="remarks"/> |
| | |
| | | b.width, |
| | | b.height, |
| | | b.shape, |
| | | b.gross_area, |
| | | a.total_area, |
| | | b.edging_type, |
| | | a.child_width, |
| | | a.child_height, |
| | | b.area, |
| | | a.icon, |
| | | a.area, |
| | | b.quantity, |
| | | a.process, |
| | | b.remarks as 'beizhu', |
| | |
| | | |
| | | <update id="updateSizeAndProcess" parameterType="java.util.List"> |
| | | <foreach collection="orderGlassDetails" item="item" index="index" open="" close="" separator=";"> |
| | | update order_glass_detail |
| | | update order_glass_detail as a, |
| | | order_detail as b |
| | | set |
| | | child_width = #{item.childWidth}, |
| | | child_height = #{item.childHeight}, |
| | | process = #{item.process} |
| | | a.child_width = #{item.childWidth}, |
| | | a.child_height = #{item.childHeight}, |
| | | a.area = #{item.area}, |
| | | a.total_area = #{item.area}*b.quantity, |
| | | a.icon = #{item.icon}, |
| | | a.process = #{item.process} |
| | | where |
| | | order_id = #{item.orderId} |
| | | and order_number = #{item.orderNumber} |
| | | and technology_number = #{item.technologyNumber} |
| | | a.order_id = b.order_id |
| | | and a.order_id = #{item.orderId} |
| | | and a.order_number = #{item.orderNumber} |
| | | and a.technology_number = #{item.technologyNumber} |
| | | </foreach> |
| | | |
| | | </update> |
| | |
| | | limit #{offset},#{pageSize} |
| | | ; |
| | | </select> |
| | | |
| | | <update id="updateProductStateById"> |
| | | update product set state = #{state} where id = #{id} |
| | | </update> |
| | | </mapper> |