|
@ -59,7 +59,14 @@ |
|
|
@submitForm="submitForm" |
|
|
@submitForm="submitForm" |
|
|
@inputNumberChange="inputNumberChange" |
|
|
@inputNumberChange="inputNumberChange" |
|
|
@tableFormSelectOnBlur="tableFormSelectOnBlur" |
|
|
@tableFormSelectOnBlur="tableFormSelectOnBlur" |
|
|
/> |
|
|
><template v-slot="{row}"> |
|
|
|
|
|
<el-date-picker v-bind:modelValue="row['validityDays']?addDay(row['produceDate'],row['validityDays']).format('YYYY-MM-DD'):''" |
|
|
|
|
|
:clearable="true" |
|
|
|
|
|
style="width: 100%" |
|
|
|
|
|
:disabled="true" |
|
|
|
|
|
:placeholder="t('ts.选择日期')"/> |
|
|
|
|
|
</template> |
|
|
|
|
|
</BasicForm> |
|
|
|
|
|
|
|
|
<!-- 详情 --> |
|
|
<!-- 详情 --> |
|
|
<Detail |
|
|
<Detail |
|
@ -101,6 +108,8 @@ |
|
|
</template> |
|
|
</template> |
|
|
|
|
|
|
|
|
<script setup lang="ts"> |
|
|
<script setup lang="ts"> |
|
|
|
|
|
import dayjs from 'dayjs' |
|
|
|
|
|
import { addDay } from '@/utils/formatTime' |
|
|
import download from '@/utils/download' |
|
|
import download from '@/utils/download' |
|
|
import { CACHE_KEY, useCache } from '@/hooks/web/useCache' |
|
|
import { CACHE_KEY, useCache } from '@/hooks/web/useCache' |
|
|
import { |
|
|
import { |
|
@ -192,6 +201,8 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => |
|
|
} else { |
|
|
} else { |
|
|
row['itemCode'] = val[0]['code'] |
|
|
row['itemCode'] = val[0]['code'] |
|
|
row['uom'] = val[0]['uom'] |
|
|
row['uom'] = val[0]['uom'] |
|
|
|
|
|
// 有效期 \ 过期日期 |
|
|
|
|
|
row['validityDays'] = val[0]['validityDays'] |
|
|
// StdcostpriceApi.queryStdcostpriceByItemCode({"itemCode":val[0]['code']}) |
|
|
// StdcostpriceApi.queryStdcostpriceByItemCode({"itemCode":val[0]['code']}) |
|
|
// .then(res => { |
|
|
// .then(res => { |
|
|
// row['singlePrice'] = res.price |
|
|
// row['singlePrice'] = res.price |
|
@ -582,6 +593,9 @@ const tableData = ref([]) |
|
|
const handleAddTable = () => { |
|
|
const handleAddTable = () => { |
|
|
let tfk = JSON.parse(JSON.stringify(tableFormKeys)) |
|
|
let tfk = JSON.parse(JSON.stringify(tableFormKeys)) |
|
|
tfk.batch = formatTime(new Date(), 'yyyyMMdd') |
|
|
tfk.batch = formatTime(new Date(), 'yyyyMMdd') |
|
|
|
|
|
//生产日期 到货日期 默认当天 |
|
|
|
|
|
tfk['produceDate'] = dayjs().valueOf() |
|
|
|
|
|
tfk['arriveDate'] = dayjs().valueOf() |
|
|
tableData.value.push(tfk) |
|
|
tableData.value.push(tfk) |
|
|
} |
|
|
} |
|
|
// 删除明细 |
|
|
// 删除明细 |
|
|